foreman-installer icon indicating copy to clipboard operation
foreman-installer copied to clipboard

Fixes #37717 - Update evr extension ownership to foreman

Open sjha4 opened this issue 1 year ago • 14 comments

Update ownership of evr extension to owner foreman to allow migrations to operate on it, specifically disable it.

sjha4 avatar Aug 06 '24 17:08 sjha4

@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.

ianballou avatar Aug 06 '24 19:08 ianballou

I confirmed that dropping the extension also drops the related entry from pg_shdepend.

ianballou avatar Aug 06 '24 19:08 ianballou

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?

sjha4 avatar Aug 06 '24 19:08 sjha4

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?

evgeni avatar Aug 07 '24 17:08 evgeni

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.

sjha4 avatar Aug 07 '24 17:08 sjha4

@evgeni docs update will go in https://github.com/theforeman/foreman-documentation/pull/3167 unless someone gets to it first.

ianballou avatar Aug 07 '24 17:08 ianballou

Prepping a system for a test.

ianballou avatar Aug 07 '24 18:08 ianballou

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.

ianballou avatar Aug 07 '24 18:08 ianballou

Aside from the postgres issue it's working.

ianballou avatar Aug 07 '24 18:08 ianballou

Aside from the postgres issue it's working.

Ok..So couple of changes..

  1. Added a check to run only on local postgres.
  2. Added code to check status of postgresql service, start it if stopped and stop it after the hook.

Should work better now.

sjha4 avatar Aug 07 '24 19:08 sjha4

Tested again by upgrading Katello 4.12 to nightly via 4.13. Worked well.

ianballou avatar Aug 07 '24 21:08 ianballou

Not sure if test failure is related.. 😕

sjha4 avatar Aug 07 '24 23:08 sjha4

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

ehelms avatar Aug 08 '24 00:08 ehelms

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

sjha4 avatar Aug 08 '24 01:08 sjha4

@ekohl : I am not sure I remember if we were supposed to change anything here following the kafo updates..

sjha4 avatar Nov 25 '24 15:11 sjha4

I will need someone with superpowers to merge this one if this is good to go.. Thanks @ekohl , @ehelms , @evgeni and @ianballou ❤️

sjha4 avatar Dec 12 '24 17:12 sjha4