oamg / leapp-repository

Leapp repositories containing actors for the Leapp framework (https://github.com/oamg/leapp). Currently provides leapp repositories for in-place upgrades of RHEL systems.
Apache License 2.0
48 stars 144 forks source link

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

Open evgeni opened 6 months ago

evgeni commented 6 months ago

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: …

  1. 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):

# 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 (https://github.com/evgeni/leapp-repository/pull/2)

pirat89 commented 6 months ago

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.