-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automate k8s Postgresql Upgrades after 3.0.0 release #1748
Comments
Jing's manual upgrade notes for upgrade from pg10 to pg14https://hpad.dataone.org/hh344k6yTuCEdhMH2IllYA
|
NotesThis process works when done manually. Need to adapt to k8s initContainer flow
TODO: Figure out Logic for startup scenarios
initcontainer Challenges
|
Nice, glad to hear our discussed process works. I'd note that I think this could also work for the migration from non-k8s to k8s Metacat installs too, if we were to standardize the idea that the presence of a dump file in a particular location is an indication that k8s MC should restore that DB before continuing. Then, the process of migrating to k8s is 1) dump your current DB, and 2) arrange for that dump to be on the right place on the PVC to be mounted in the MC postgres container (plus much of the other housekeeping you listed for the 2.19 to 3.* upgrades). One thing to note is that the dump file should probably be moved or removed after a successful restore so that it is not re-restored on the next startup (possibly deleting data along the way). Of course, that removel would need to be done carefully so we don't lose an important backup. |
The solution currently gets around this without the need for renaming/deleting dump files: it finds and restores a dump file ONLY if:
|
Successfully tested scenarios using code in PR #2101:
|
(discussed with @mbjones in ESS-DIVE Meeting)
We will release the 3.0.0 metacat helm chart with postgres v14 as a subchart.
The Metacat helm chart appears to work ok with postgres 14, 15, 16, when starting up with a new database.
However, upgrading between these major versions currently requires manual intervention.
It is up to individual operators to ensure the mounted data directory has been manually upgraded to be compatible with postgresql v14 before installing the helm chart.
After the v3.0.0 release, however, we will find a way to automate postgres upgrades (but only from the previous version to the new version), so that if operators stay up to date with metacat releases, their upgrades should be seamless
Some examples of container-specific solutions:
Official postgres documentation; see in particular:
The text was updated successfully, but these errors were encountered: