Bug 2104730
| Summary: | PostgreSQL permissions are broken after LEAPP upgrade when PostgreSQL is on dedicated partition | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Brenden Wood <bwood> | ||||
| Component: | leapp-repository | Assignee: | Evgeni Golov <egolov> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Lukas Pramuk <lpramuk> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 7.9 | CC: | ahumbe, bwood, egolov, kkinge, mhecko, saydas, sraut | ||||
| Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | leapp-repository-0.16.0-7.el7_9 | Doc Type: | If docs needed, set a value | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2022-08-23 20:14:19 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Brenden Wood
2022-07-07 03:51:45 UTC
I can reproduce the issue and it seems to stem from the fact that the old PostgreSQL data was on an own mountpoint and had to be moved over. However, I am sure we had this scenario tested and it worked. Looking into the details. The upstream PR proposed to fix the problem: https://github.com/oamg/leapp-repository/pull/916 VERIFIED.
@Satellite 6.11.1
leapp-0.14.0-1.el7_9.noarch
leapp-upgrade-el7toel8-0.16.0-7.el7_9.noarch
by the following manual reproducer:
1) Switch over PostgreSQL to be mounted at /var/opt/rh/rh-postgresql12/lib/pgsql
# eval $(blkid -o export /dev/vdb1)
# echo "UUID=$UUID /var/opt/rh/rh-postgresql12/lib/pgsql xfs defaults 0 2">> /etc/fstab
# satellite-maintain service stop
# mv /var/opt/rh/rh-postgresql12/lib/pgsql{,-orig}
# mkdir /var/opt/rh/rh-postgresql12/lib/pgsql
# mount -a
# mv /var/opt/rh/rh-postgresql12/lib/pgsql-orig/* /var/opt/rh/rh-postgresql12/lib/pgsql
# chown postgres:postgres /var/opt/rh/rh-postgresql12/lib/pgsql
# chmod 700 /var/opt/rh/rh-postgresql12/lib/pgsql
# restorecon -v /var/opt/rh/rh-postgresql12/lib/pgsql
# satellite-maintain service start
2) Run LEAPP upgrade of Satellite 6.11 to RHEL8
# leapp upgrade --reboot
3) After leapp upgrade finishes check satellite health
FIX:
# hammer ping
database:
Status: ok
Server Response: Duration: 0ms
candlepin:
Status: ok
Server Response: Duration: 41ms
candlepin_auth:
Status: ok
Server Response: Duration: 40ms
candlepin_events:
Status: ok
message: 0 Processed, 0 Failed
Server Response: Duration: 0ms
katello_events:
Status: ok
message: 0 Processed, 0 Failed
Server Response: Duration: 0ms
pulp3:
Status: ok
Server Response: Duration: 183ms
pulp3_content:
Status: ok
Server Response: Duration: 77ms
foreman_tasks:
Status: ok
Server Response: Duration: 3ms
vs.
REPRO:
# hammer ping
Error: Failed to open TCP connection to sat.local:443 (Connection refused - connect(2) for "sat.local" port 443)
The result depends on mountpoint! If you have one of these then you are safe and the fix delivers resolution: /var /var/opt /var/opt/rh /var/opt/rh/rh-postgresql12 /var/opt/rh/rh-postgresql12/lib /var/opt/rh/rh-postgresql12/lib/pgsql All these possible mountpoints are fixed by this BZ -> VERIFIED However if the mountpoint is lowest possible one: /var/opt/rh/rh-postgresql12/lib/pgsql/data Then you shouldn't proceed ! LEAPP upgrade hangs forever and after forced reboot system is unusable -> tracked by BZ 2111835 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (leapp-repository bug fix update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:6141 |