Fixes #31834: Ensure PostgreSQL 12 is enabled on EL8#646
Conversation
| if local_postgresql? && el8? | ||
| postgres_version, success = execute_command('postgres --version', false, true) | ||
|
|
||
| if success && !postgres_version.include?('12.') |
There was a problem hiding this comment.
PG 13 is also out and I wouldn't be surprised if someone used it at some point. They may be annoyed that it forces them to downgrade.
Another thing to consider is users who use packages from postgresql.org. https://www.postgresql.org/download/linux/redhat/ suggests it installs as postgresql$VERSION-server (so postgesql12-server). Not sure if they'll show up and if so, how but we have seen community users who use them.
There was a problem hiding this comment.
Hrmm, sounds like you are saying I should just limit this to Katello and leave Foreman alone since it can be in a wide variety of states.
There was a problem hiding this comment.
I recall that user of postgresql.org was running Katello and ran into problems because of the evr package.
There was a problem hiding this comment.
There was a problem hiding this comment.
That was quite a bit ago. And I feel like Katello has traditionally supported PG that comes with the OS to reduce support burden and matrix. We did this on EL7 through the use of the SCL as well. I have simplified this PR to just do this for the Katello scenario.
ekohl
left a comment
There was a problem hiding this comment.
I really doubt that this will work.
|
This now uses the dnfprovider for the package type through Puppet which is available as of 6.15.0 and 5.5.20 per https://tickets.puppetlabs.com/browse/PUP-10235 |
| ensure_dnf_module('pki-core', '10.6') | ||
|
|
||
| if local_postgresql? | ||
| ensure_dnf_module('postgresql', '12') |
There was a problem hiding this comment.
I can take a look at if we can solve this in puppetlabs-postgresql as a long term solution.
There was a problem hiding this comment.
Could be nice there long term, I dont see modules going away.
| @@ -0,0 +1,7 @@ | |||
| if (module_enabled?('katello') || module_enabled?('foreman_proxy_content')) && el8? | |||
| ensure_dnf_module('pki-core', 'present') | |||
There was a problem hiding this comment.
I started with theforeman/puppet-candlepin#175. We've observed that starting Puppet typically adds a few seconds so I'd prefer to solve it as part of the main loop.
There was a problem hiding this comment.
This blocks Katello so we need to get any changes and release ASAP.
|
#650 doesnt look like it will work for a release branch which we need this change on, so will we merge this change, cherry pick it and then pick up the long term fixes as they get released? |
|
Summarizing an offline discussion:
|
I was not sure if I should try to code up the steps to upgrade Foreman EL8 existing databases or leave that to the docs. The steps are effectively: