-
Notifications
You must be signed in to change notification settings - Fork 31
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
Block when cP accts have DBs on distro PgSQL #327
Block when cP accts have DBs on distro PgSQL #327
Conversation
b54960b
to
69b622a
Compare
69b622a
to
5f1ac8b
Compare
One or more users on your system have associated PostgreSQL databases. | ||
ELevate may upgrade the software packages associated with PostgreSQL | ||
automatically, but if it does, it will *NOT* automatically update the | ||
PostgreSQL data directory to work with the new version. Without an update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we run the script to upgrade them? Why can't we use the psql channel to switch them to 8.3 instead of 10?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can't be 8.3 because downgrades are not possible.
We can upgrade them. It could be a candidate for a leapp actor, even, though that assumes that AlmaLinux wants something like that in their fork. (I'm assuming that there's a reason Red Hat never did something similar for their original version of leapp, in favor of producing documentation instead.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I meant 9.6 See these old instructions:
- You have postgresql-server version 9.2 installed.
- This is upgraded irreversably to version 10.0 when you switch to AlmaLinux 8
- We recommend data backup and removal of all postgresql packages before upgrade to AlmaLinux 8.
- To re-install postgresql 9 on AlmaLinux 8, you can run: `dnf -y module enable postgresql:9.6; dnf -y install postgresql-server`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In theory we could do this for them...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but we would still need to perform the data directory update, because prior to PostgreSQL 10, the first two elements of the version number are considered the "major" version: 9.2.x to 9.6.x is a major upgrade.
converting to draft while we discuss this further internally. |
5f1ac8b
to
36fbb86
Compare
This just needs a rebase before I approve it |
36fbb86
to
0a41bce
Compare
Modify the Databases blocker to add a condition which checks for the following three conditions: 1. a `postgresql-server` package is installed; 2. the file `/var/cpanel/acknowledge_postgresql_for_elevate` does not exist; 3. one or more cPanel users have a PostgreSQL database mapped to them. If all three are true, issue a blocker. In the blocker message, indicate which cPanel accounts have relevant databases, point the admin to resources which explain how to update the PostgreSQL data directory, and instruct the admin on how to acknowledge the blocking warning using the touch file. Additionally, modify the "Blockers" documentation page with the same resources as well as a potential way to use distro-provided tools to perform the update of the data directory and resolve the issue.
0a41bce
to
8cec4fc
Compare
This patch is requested by cPanel Support to try to prevent users of PostgreSQL on cPanel from being surprised that their databases are unavailable once the ELevate process completes; see CPANEL-43203 for previous discussion.
Modify the Databases blocker to add a condition which checks for the following three conditions:
postgresql-server
package is installed;/var/cpanel/acknowledge_postgresql_for_elevate
does not exist;If all three are true, issue a blocker. In the blocker message, indicate which cPanel accounts have relevant databases, point the admin to resources which explain how to update the PostgreSQL data directory, and instruct the admin on how to acknowledge the blocking warning using the touch file. Additionally, modify the "Blockers" documentation page with the same resources as well as a potential way to use distro-provided tools to perform the update of the data directory and resolve the issue.
By submitting pull requests to this repo, I agree to the Contributor License Agreement which can be found at: https://github.com/cpanel/elevate/blob/main/docs/cPanel-CLA.pdf