-
Sub-task
-
Resolution: Done
-
Undefined
-
None
-
None
-
3
-
False
-
-
False
-
0
-
sat-rocket
-
-
-
Satellite Rocket Sprint 1, Satellite Rocket Sprint 2, Satellite Rocket Sprint 3
Description of problem:
Restore of 6.16 w/ upgraded remote DB fails on dropping evr extensions while restore of fresh 6.16 w/ remote DB succeeds.
How reproducible:
6.16.z w/ remote DB
deterministic
Is this issue a regression from an earlier version:
yes
Steps to Reproduce:
1. Have upgraded 6.16 with remote DB upgraded from PG12
2. After upgrade fix evr extension ownership by running:
# runuser -l postgres -c \ "psql -d foreman -c \"UPDATE pg_extension SET extowner = (SELECT oid FROM pg_authid WHERE rolname='foreman') WHERE extname='evr';\""
3. Run installer reset (part of restore process)
# satellite-installer --reset-data <<<y 2025-03-12 10:09:46 [NOTICE] [root] Loading installer configuration. This will take some time. 2025-03-12 10:09:51 [NOTICE] [root] Running installer with log based terminal output at level NOTICE. 2025-03-12 10:09:51 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions. Are you sure you want to continue? This will drop the databases, reset all configurations that you have made and bring all application data back to a fresh install. [y/n] 2025-03-12 10:09:57 [NOTICE] [pre] Dropping foreman database! 2025-03-12 10:09:57 [ERROR ] [root] PGPASSWORD='<PASSWORD>' psql -U foreman -h <DB_HOST> -p 5432 -d foreman -t -c "DROP OWNED BY CURRENT_USER CASCADE;" failed! Check the output for error!
Actual behavior:
[Describe the issue in detail, including what is happening and where]
Cascaded drop for foreman user fails even though he owns evr extension
# PGPASSWORD='<PASSWORD>' psql -U foreman -h <DB_HOST> -p 5432 -d foreman -t -c "DROP OWNED BY CURRENT_USER CASCADE;" ERROR: cannot drop type evr_t because extension evr requires it HINT: You can drop extension evr instead. # PGPASSWORD='<PASSWORD>' psql -U foreman -h <DB_HOST> -p 5432 -d foreman -t -c "SELECT * FROM pg_extension;" 14372 | plpgsql | 10 | 11 | f | 1.0 | | 16910 | evr | 16384 | 2200 | t | 0.0.2 | |
Expected behavior:
[Describe what should be happening instead]
This is also behavior on fresh installation:
# PGPASSWORD='<PASSWORD>' psql -U foreman -h <DB_HOST> -p 5432 -d foreman psql (13.20) SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off) Type "help" for help. foreman=> DROP OWNED BY CURRENT_USER CASCADE; DROP OWNED
Business Impact / Additional info:
non-remote db upgrade is not affected
QE Tracker for https://issues.redhat.com/browse/SAT-31763