foreman-installer fails to configure Postgres on CentOS Stream 8
1) Install Foreman on CentOS 8
2) Upgrade host to Centos Stream 8, OS upgraded fine
3) Notice httpd did not start:
Dec 17 13:35:42 foreman.example.com systemd: Starting The Apache HTTP Server... ... ec 17 13:35:42 foreman.example.com httpd: [Thu Dec 17 13:35:42.585406 2020] [so:warn] [pid 348365] AH01574: module systemd_module is already loaded, skipping Dec 17 13:35:42 foreman.example.com httpd: [Thu Dec 17 13:35:42.585893 2020] [so:warn] [pid 348365] AH01574: module cgi_module is already loaded, skipping Dec 17 13:35:42 foreman.example.com httpd: AH00534: httpd: Configuration error: More than one MPM loaded. Dec 17 13:35:42 foreman.example.com systemd: httpd.service: Main process exited, code=exited, status=1/FAILURE
4) Attempt to run foreman-installer to resolve:
2020-12-14 11:16:14 [DEBUG ] [configure] importing '/usr/share/foreman-installer/modules/postgresql/manifests/globals.pp' in environment production 2020-12-14 11:16:14 [DEBUG ] [configure] Automatically imported postgresql::globals from postgresql/globals into production 2020-12-14 11:16:14 [ERROR ] [configure] Evaluation Error: Error while evaluating a Function Call, No preferred version defined or automatically detected. (file: /usr/share/foreman-installer/modules/postgresql/manifests/globals.pp, line: 231, column: 5) on node dhcp-8-29-92.lab.eng.rdu2.redhat.com 2020-12-14 11:16:14 [NOTICE] [configure] System configuration has finished. 2020-12-14 11:16:14 [NOTICE] [post] Executing hooks in group post
Looks like the OS detection code in /usr/share/foreman-installer/modules/postgresql/manifests/globals.pp does not know how to resolve CentOS 8 version strings and may need an update
#1 Updated by Ewoud Kohl van Wijngaarden over 1 year ago
It looks like Stream is identified by just a major version. The PostgreSQL module has a matcher for ^8\. which doesn't match 8 so it can't determine the default (as you correctly identified).
I at least opened https://github.com/puppetlabs/puppetlabs-postgresql/pull/1222. In Apache I found more complex code with versions, but hope that I have it with https://github.com/puppetlabs/puppetlabs-apache/pull/2110. I haven't tested it myself yet.
#4 Updated by Ewoud Kohl van Wijngaarden over 1 year ago
Linking the discussion back: https://community.theforeman.org/t/running-foreman-on-centos-8-stream-support/21948.
The PostgreSQL PR has been merged and is planned to be released soon. I'm trying to get it into 2.4.