Project

General

Profile

Actions

Bug #30019

open

Installation failed when using --foreman-db-manage false and --katello-candlepin-manage-db false

Added by Carl Thompson almost 4 years ago. Updated over 3 years ago.

Status:
Need more information
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

When performing the installation with remote databases the installation fails when using --foreman-db-manage false and --katello-candlepin-manage-db false

I suspect this is due to not installing and configuring local Postgres so that the pulpcore database can be created.

If I remove --foreman-db-manage false from the installation run then postgres is installed, pulpcore database is created and the installation functions without issue utilizing remote databases for everything except pulpcore.

Failed command:

foreman-installer --scenario katello \
--foreman-db-host <foreman remote db> \
--foreman-db-port 5433 \
--foreman-db-password <password> \
--foreman-db-database foreman \
--foreman-db-username <username> \
--foreman-db-manage false \
--katello-candlepin-db-host <candlepin remote db> \
--katello-candlepin-db-port 5433 \
--katello-candlepin-db-name candlepin \
--katello-candlepin-db-password <password> \
--katello-candlepin-db-user <username> \
--katello-candlepin-db-ssl true \
--katello-candlepin-db-ssl-verify false \
--katello-candlepin-manage-db false \
--katello-pulp-db-username <username> \
--katello-pulp-db-password <password> \
--katello-pulp-db-seeds "<pulp remote db and port>" \
--katello-pulp-db-name pulp_database \
--katello-pulp-db-ssl true \
--katello-pulp-db-verify-ssl false \
--katello-pulp-manage-db false

Successful command:
foreman-installer --scenario katello \
--foreman-db-host <foreman remote db> \
--foreman-db-port 5433 \
--foreman-db-password <password> \
--foreman-db-database foreman \
--foreman-db-username <username> \
--katello-candlepin-db-host <candlepin remote db> \
--katello-candlepin-db-port 5433 \
--katello-candlepin-db-name candlepin \
--katello-candlepin-db-password <password> \
--katello-candlepin-db-user <username> \
--katello-candlepin-db-ssl true \
--katello-candlepin-db-ssl-verify false \
--katello-candlepin-manage-db false \
--katello-pulp-db-username <username> \
--katello-pulp-db-password <password> \
--katello-pulp-db-seeds "<pulp remote db and port>" \
--katello-pulp-db-name pulp_database \
--katello-pulp-db-ssl true \
--katello-pulp-db-verify-ssl false \
--katello-pulp-manage-db false


Files

katello.log katello.log 3.16 MB Carl Thompson, 06/04/2020 03:23 PM
Actions #1

Updated by Chris Roberts almost 4 years ago

Thank you for bringing this up, I will raise it with the installer team and have them reply here with their feedback.

Actions #2

Updated by William Clark almost 4 years ago

Hi Carl, thanks for reporting this issue. There are actually a few issues to unpack here:

1. There are a separate set of parameters for the Pulpcore1 database, but unfortunately at this time they aren't displayed by using `foreman-installer --help` but only with `foreman-installer --full-help`. That in itself is a bug and I'll work on getting those moved so that they are easier to find. For now you can observe the relevant parameters below:

[1] Pulpcore, the next generation Pulp server, uses a Postgresql database, as opposed to the previous generation Pulp 2 which used MongoDB.

[root@centos7-katello-nightly ~]# foreman-installer --full-help | grep -v reset | grep pulpcore | grep postgres
--foreman-proxy-content-pulpcore-manage-postgresql Manage the Pulpcore PostgreSQL database. (current: true)
--foreman-proxy-content-pulpcore-postgresql-host Host of the Pulpcore PostgreSQL database. Must be specified if external/unmanaged. (current: "localhost")
--foreman-proxy-content-pulpcore-postgresql-password Password of the Pulpcore PostgreSQL database. (current: "PjRWcTbrctCebymyowACyg4HeoUbJcDU")
--foreman-proxy-content-pulpcore-postgresql-port Port of the Pulpcore PostgreSQL database. (current: 5432)
--foreman-proxy-content-pulpcore-postgresql-ssl Enable SSL connection to the Pulpcore PostgreSQL database. Only meaningful for external/unmanaged DB. (current: false)
--foreman-proxy-content-pulpcore-postgresql-ssl-cert Path to SSL certificate to use for Pulpcore connection to PostgreSQL database. (current: "/etc/pki/katello/certs/pulpcore-database.crt")
--foreman-proxy-content-pulpcore-postgresql-ssl-key Path to key file to use for Pulpcore connection to PostgreSQL database. (current: "/etc/pki/katello/private/pulpcore-database.key")
--foreman-proxy-content-pulpcore-postgresql-ssl-require Configure Pulpcore to require an encrypted connection to the PostgreSQL database. (current: true)
--foreman-proxy-content-pulpcore-postgresql-ssl-root-ca Path to the root certificate authority to validate the certificate supplied by the PostgreSQL database server. (current: "/etc/pki/tls/certs/ca-bundle.crt")
--foreman-proxy-content-pulpcore-postgresql-user User of the Pulpcore PostgreSQL database. (current: "pulp")
[root@centos7-katello-nightly ~]#

2. Although it's not what you intended, the way you ran the installer should technically have resulted in a successful installation with an external Foreman database and an internal Pulpcore database. I'll talk to some colleagues about whether we indeed intend for that to be a valid use case, but at this time I don't see any reason why not. That would require some work due to the way the Puppet modules are composed in the installer.

For now, I would recommend you try the installation again while also supplying the necessary parameters for the external Pulpcore database. Please let us know how that works for you.

Kind regards,

Actions #3

Updated by Carl Thompson almost 4 years ago

A note. I am running katello 3.15.1 and I do not have those options:

foreman-installer --full-help | grep -v reset | grep pulpcore | grep postgres

This returns nothing on 3.15.1, it is foreman-2.0.0-2

Actions #4

Updated by Samir Jha almost 4 years ago

  • Project changed from Katello to Installer
  • Category deleted (Installer)
Actions #5

Updated by William Clark almost 4 years ago

Carl Thompson wrote:

A note. I am running katello 3.15.1 and I do not have those options:

foreman-installer --full-help | grep -v reset | grep pulpcore | grep postgres

This returns nothing on 3.15.1, it is foreman-2.0.0-2

Hi Carl, thanks for the clarification.

Checking the logs, we see:

[DEBUG 2020-06-04T10:08:21 main] Executing: '/usr/bin/systemctl start -- postgresql'
[DEBUG 2020-06-04T10:08:21 main] Running journalctl command to get logs for systemd start failure: journalctl n 50 --since '5 minutes ago' -u postgresql --no-pager
[DEBUG 2020-06-04T10:08:21 main] Executing: 'journalctl -n 50 --since '5 minutes ago' -u postgresql --no-pager'
[ERROR 2020-06-04T10:08:21 main] Systemd start for postgresql failed!
[ERROR 2020-06-04T10:08:21 main] journalctl log for postgresql:
[ERROR 2020-06-04T10:08:21 main] -
Logs begin at Thu 2020-06-04 09:45:29 CDT, end at Thu 2020-06-04 10:08:21 CDT. --
[ERROR 2020-06-04T10:08:21 main] Jun 04 10:08:21 host redacted systemd1: Starting PostgreSQL database server...
[ERROR 2020-06-04T10:08:21 main] Jun 04 10:08:21 host redacted systemd1: postgresql.service: main process exited, code=exited, status=2/INVALIDARGUMENT
[ERROR 2020-06-04T10:08:21 main] Jun 04 10:08:21 host redacted systemd1: Failed to start PostgreSQL database server.
[ERROR 2020-06-04T10:08:21 main] Jun 04 10:08:21 host redacted systemd1: Unit postgresql.service entered failed state.
[ERROR 2020-06-04T10:08:21 main] Jun 04 10:08:21 host redacted systemd1: postgresql.service failed.

The reason the installer is trying to install pulpcore on a local postgresql database is that support for external pulpcore database hadn't been implemented yet as of 3.15 release, while the installation with managed pulpcore database assumes that the foreman database is also managed.

In any case, pulpcore is a feature which is in development preview as of the 3.15 release. For any sort of production installation you are better off simply disabling it and relying on pulp2 instead.

Please try with the following installer options both changed to false:

[root@centos7-katello-3-15 ~]# foreman-installer --full-help | grep -v reset | egrep 'pulpcore-enabled|proxy-pulp'
--foreman-proxy-content-proxy-pulp-isos-to-pulpcore Proxy /pulp/isos to pulpcore at /pulp/content (current: true)
--foreman-proxy-plugin-pulp-pulpcore-enabled enables/disables the pulpcore plugin (current: true)

Actions #6

Updated by Ewoud Kohl van Wijngaarden over 3 years ago

  • Status changed from New to Need more information
  • Triaged changed from No to Yes

Does that resolve the issue?

Actions

Also available in: Atom PDF