Fixes #37717 - Update evr extension ownership to foreman
Update ownership of evr extension to owner foreman to allow migrations to operate on it, specifically disable it.
@ekohl mentioned before that the pg_shdepend table might also need updating, but at least functionally it doesn't seem necessary since the migration passes with @sjha4 's changes alone. The bits that would get updated in pg_shdepend may get dropped with the evr extension.
I confirmed that dropping the extension also drops the related entry from pg_shdepend.
I tested the installer with the chages here although I had to put the new code in a separate pre-hook file to be run..Suggestions on where to put this code if not this file?
What about remote db users? Will those need to perform manual steps (we usually don't have enough permissions to change ownership of objects there) before the upgrade?
What about remote db users? Will those need to perform manual steps (we usually don't have enough permissions to change ownership of objects there) before the upgrade?
Ya..They'll need to run the update ownership query manually as part of their upgrades. Will need to be documented.
@evgeni docs update will go in https://github.com/theforeman/foreman-documentation/pull/3167 unless someone gets to it first.
Prepping a system for a test.
Found an issue -- the postgres command cannot run because the postgres service is down during the installer run. We'll need to turn postgres on first.
Aside from the postgres issue it's working.
Aside from the postgres issue it's working.
Ok..So couple of changes..
- Added a check to run only on local postgres.
- Added code to check status of postgresql service, start it if stopped and stop it after the hook.
Should work better now.
Tested again by upgrading Katello 4.12 to nightly via 4.13. Worked well.
Not sure if test failure is related.. 😕
Not sure if test failure is related.. 😕
Looks like minitar 1.0.0 was released today and we made need to pin it for the time being -- https://rubygems.org/gems/minitar/versions/1.0.0
Not sure if test failure is related.. 😕
Looks like minitar 1.0.0 was released today and we made need to pin it for the time being -- https://rubygems.org/gems/minitar/versions/1.0.0
Ya..That was it..
https://github.com/theforeman/foreman-installer/pull/956
@ekohl : I am not sure I remember if we were supposed to change anything here following the kafo updates..
I will need someone with superpowers to merge this one if this is good to go.. Thanks @ekohl , @ehelms , @evgeni and @ianballou ❤️