Skip to content
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

el8toel9: PostgreSQL upgrade warning even when using PostgreSQL 13 on EL8 #1183

Open
evgeni opened this issue Feb 20, 2024 · 3 comments · May be fixed by #1315
Open

el8toel9: PostgreSQL upgrade warning even when using PostgreSQL 13 on EL8 #1183

evgeni opened this issue Feb 20, 2024 · 3 comments · May be fixed by #1315
Labels
bug Something isn't working

Comments

@evgeni
Copy link
Member

evgeni commented Feb 20, 2024

Actual behavior
When upgrading an EL8 system with PostgreSQL 13 installed, a warning is issued that manual steps are required when on EL9. This is however not correct, as EL9 also ships PostgreSQL 13 by default and the upgrade "just works"

To Reproduce
Steps to reproduce the behavior

  1. install empty EL8 machine
  2. dnf module enable postgresql:13
  3. dnf install postgresql-server
  4. postgresql-setup --initdb
  5. systemctl enable --now postgresql
  6. leapp preupgrade
============================================================
                      REPORT OVERVIEW                       
============================================================

HIGH and MEDIUM severity reports:
…
    4. PostgreSQL (postgresql-server) has been detected on your system
Risk Factor: medium 
Title: PostgreSQL (postgresql-server) has been detected on your system
Summary: PostgreSQL server component will be upgraded. Since RHEL-9 includes PostgreSQL server 13 by default, which is incompatible with 9.6, 10 and 12 included in RHEL-8, it is necessary to proceed with additional steps for the complete upgrade of the PostgreSQL data.
Related links:
    - Migrating to a RHEL 9 version of PostgreSQL: https://access.redhat.com/articles/6654721
Remediation: [hint] Back up your data before proceeding with the upgrade and follow steps in the documentation section "Migrating to a RHEL 9 version of PostgreSQL" after the upgrade.
Key: 6966486bbbf49710d1d9f4e4f6b612217aca38a1

Expected behavior
Given that I am already on PostgreSQL 13, I would expect not to see the PostgreSQL warning (by checking the version of the postgresql-server package and only emitting the above warning if it's not 13.x).

Continuing with the upgrade, ignoring this warning, indeed produces a system with a working PostgreSQL 13 from EL9 running.

System information (please complete the following information):

  • OS and version: CentOS Stream 8 (but the same should happen on RHEL 8)
# rpm -qa "leapp*"
leapp-0.17.0-1.el8.noarch
leapp-upgrade-el8toel9-deps-0.20.0-0.20240219100256855647.pr2.615.g3fb6c3db.el8.noarch
leapp-deps-0.17.0-1.el8.noarch
leapp-upgrade-el8toel9-0.20.0-0.20240219100256855647.pr2.615.g3fb6c3db.el8.noarch

leapp-repository is v0.20.0 plus my CentOS patches (evgeni#2)

@evgeni evgeni added the bug Something isn't working label Feb 20, 2024
@pirat89
Copy link
Member

pirat89 commented Feb 21, 2024

Discussed with database team, the report is still wanted, as one of actions prior the upgrade (in general) is the complete backup of the system. In case of databases, it's better to have the warning still present so users have the backup of their data (ideally, dump of current database). So in case of any issues, they can recover it. The way here would an update of the text, so people are aware that possibly they will not need to recover the database after the upgrade, but they should still be informed the dump is recommended anyway.

@sayan3296
Copy link

Hello, The message can certainly be improved since RH Satellite 6.16 on RHEL 8 comes with pg 13 and when leapping it, We don't need to do any manual db migration.

So we can say this i.e.

Risk Factor: medium 
Title: PostgreSQL (postgresql-server) has been detected on your system
Summary: PostgreSQL server component will be upgraded. Since RHEL-9 includes PostgreSQL server 13 by default, which is incompatible with 9.6, 10 and 12 included in RHEL-8, it is necessary to proceed with additional steps for the complete upgrade of the PostgreSQL data. 
If the database has already been upgraded, then no further actions are required.

Related links:
    - Migrating to a RHEL 9 version of PostgreSQL: https://access.redhat.com/articles/6654721
Remediation: [hint] Back up your data before proceeding with the upgrade and follow steps in the documentation section "Migrating to a RHEL 9 version of PostgreSQL" after the upgrade.
Key: 6966486bbbf49710d1d9f4e4f6b612217aca38a1

or something similar. Or else , specifically for satellite, if someone notes the instructions down and soon after upgrade and reboot, they stop postgres service in an attempt to upgrade it, It will cause a fatal error for the leapp_resume step that happens in case of satellite\capsules.

@pirat89 pirat89 linked a pull request Nov 21, 2024 that will close this issue
@pirat89
Copy link
Member

pirat89 commented Dec 5, 2024

discussed with the database team, the report is going to be modified by #1315 - please take a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants