Foreman upgrade from 3.8 to 3.9 failed

Problem:

Upgrade fails when trying to upgrade Foreman from v3.8 to v3.9. I have to add that this issue was still unresolved since Foreman v3.7. I have a snapshot so I can roll back to v3.8 (and v3.7 if need be). I was holding out hope that the dnf update problem with tomcat would be resolved by upgrading Foreman, but alas I’m in a bigger mess now.

I followed these instructions: Upgrading Foreman to 3.9

Expected outcome:

No errors

Foreman and Proxy versions:

v3.8.0

Foreman and Proxy plugin versions:

n/a

Distribution and version:

CeontOS stream 8

Other relevant data:

user@fm01:~$ sudo foreman-installer
2024-01-24 19:06:44 [NOTICE] [root] Loading installer configuration. This will take some time.
2024-01-24 19:06:47 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2024-01-24 19:06:47 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
2024-01-24 19:06:54 [NOTICE] [configure] Starting system configuration.
2024-01-24 19:07:08 [NOTICE] [configure] 250 configuration steps out of 1976 steps complete.
2024-01-24 19:07:10 [NOTICE] [configure] 500 configuration steps out of 1976 steps complete.
2024-01-24 19:07:12 [NOTICE] [configure] 750 configuration steps out of 1981 steps complete.
2024-01-24 19:07:13 [NOTICE] [configure] 1000 configuration steps out of 1986 steps complete.
2024-01-24 19:07:13 [NOTICE] [configure] 1250 configuration steps out of 1988 steps complete.
2024-01-24 19:07:27 [NOTICE] [configure] 1500 configuration steps out of 1988 steps complete.
2024-01-24 19:09:06 [NOTICE] [configure] 1750 configuration steps out of 1988 steps complete.
2024-01-24 19:09:07 [ERROR ] [configure] 'pulpcore-manager migrate --noinput' returned 1 instead of one of [0]
2024-01-24 19:09:07 [ERROR ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: change from 'notrun' to ['0'] failed: 'pulpcore
-manager migrate --noinput' returned 1 instead of one of [0]
2024-01-24 19:10:10 [NOTICE] [configure] System configuration has finished.

Error 1: Puppet Exec resource 'pulpcore-manager migrate --noinput' failed. Logs:
  /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]
    Adding autorequire relationship with File[/var/lib/pulp]
    Adding autorequire relationship with User[pulp]
    Starting to evaluate the resource (1831 of 1988)
    Evaluated in 1.11 seconds
  Exec[pulpcore-manager migrate --noinput](provider=posix)
    Executing check 'pulpcore-manager migrate --plan | grep "No planned migration operations"'
    Executing 'pulpcore-manager migrate --noinput'
  /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/unless
    Traceback (most recent call last):
      [...]
    pkg_resources.DistributionNotFound: The 'jinja2<=3.1.2,>=3.1' distribution was not found and is required by pulpcore
    change from 'notrun' to ['0'] failed: 'pulpcore-manager migrate --noinput' returned 1 instead of one of [0]

1 error was detected during installation.
Please address the errors and re-run the installer to ensure the system is properly configured.
Failing to do so is likely to result in broken functionality.

The full log is at /var/log/foreman-installer/katello.log
1 Like

Used the --nobest option as this was the only way to update with the Foreman v3.7 installation due to the tomcat issue. The Foreman v3.8 upgrade to v3.9 yielded the following dnf errors when trying without the --nobest option:

user@fm01:~$ sudo dnf update
Last metadata expiration check: 0:02:48 ago on Wed 24 Jan 2024 19:00:39 CET.
Error:
 Problem 1: package tomcatjss-7.7.1-1.module_el8.6.0+1038+e795ee4b.noarch from @System requires pki-servlet-engine >= 1:9.0.7, but none of the providers can be installed
  - package tomcat-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by tomcat-1:9.0.62-12.el8.noarch from @System
  - cannot install both tomcat-1:9.0.62-29.el8.noarch from appstream and tomcat-1:9.0.62-12.el8.noarch from @System
  - package tomcat-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by pki-servlet-engine-1:9.0.30-1.module_el8.4.0+595+e59c9af2.noarch from appstream
  - package tomcat-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by pki-servlet-engine-1:9.0.30-3.module_el8.5.0+854+e1c92b81.noarch from appstream
  - cannot install the best update candidate for package tomcatjss-7.7.1-1.module_el8.6.0+1038+e795ee4b.noarch
  - cannot install the best update candidate for package tomcat-1:9.0.62-12.el8.noarch
 Problem 2: package candlepin-4.3.1-1.el8.noarch from @System requires pki-servlet-engine, but none of the providers can be installed
  - package tomcat-el-3.0-api-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by tomcat-1:9.0.62-12.el8.noarch from @System
  - package tomcat-el-3.0-api-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by pki-servlet-engine-1:9.0.30-1.module_el8.4.0+595+e59c9af2.noarch from appstrea$
  - package tomcat-el-3.0-api-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by pki-servlet-engine-1:9.0.30-3.module_el8.5.0+854+e1c92b81.noarch from appstrea$
  - cannot install the best update candidate for package tomcat-el-3.0-api-1:9.0.62-12.el8.noarch
  - cannot install the best update candidate for package candlepin-4.3.1-1.el8.noarch
 Problem 3: package katello-4.11.0-1.el8.noarch from katello requires candlepin >= 2.0, but none of the providers can be installed
  - package candlepin-4.3.1-1.el8.noarch from @System requires pki-servlet-engine, but none of the providers can be installed
  - package candlepin-4.3.1-1.el8.noarch from candlepin requires pki-servlet-engine, but none of the providers can be installed
  - package tomcat-jsp-2.3-api-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by tomcat-1:9.0.62-12.el8.noarch from @System
  - package tomcat-jsp-2.3-api-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by pki-servlet-engine-1:9.0.30-1.module_el8.4.0+595+e59c9af2.noarch from appstre$
m
  - package tomcat-jsp-2.3-api-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by pki-servlet-engine-1:9.0.30-3.module_el8.5.0+854+e1c92b81.noarch from appstre$
m
  - cannot install the best update candidate for package tomcat-jsp-2.3-api-1:9.0.62-12.el8.noarch
  - cannot install the best update candidate for package katello-4.10.0-1.el8.noarch
 Problem 4: package katello-4.11.0-1.el8.noarch from katello requires candlepin >= 2.0, but none of the providers can be installed
  - problem with installed package katello-4.10.0-1.el8.noarch
  - package candlepin-4.3.1-1.el8.noarch from @System requires pki-servlet-engine, but none of the providers can be installed
  - package candlepin-4.3.1-1.el8.noarch from candlepin requires pki-servlet-engine, but none of the providers can be installed
  - package katello-4.10.0-1.el8.noarch from @System requires katello-common = 4.10.0-1.el8, but none of the providers can be installed
  - package katello-4.11.0-0.2.rc1.el8.noarch from katello requires katello-common = 4.11.0-0.2.rc1.el8, but none of the providers can be installed
  - package katello-4.11.0-0.2.rc2.el8.noarch from katello requires katello-common = 4.11.0-0.2.rc2.el8, but none of the providers can be installed
  - package tomcat-lib-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by tomcat-1:9.0.62-12.el8.noarch from @System
  - package tomcat-lib-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by pki-servlet-engine-1:9.0.30-1.module_el8.4.0+595+e59c9af2.noarch from appstream
  - package tomcat-lib-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by pki-servlet-engine-1:9.0.30-3.module_el8.5.0+854+e1c92b81.noarch from appstream
  - cannot install both katello-common-4.11.0-1.el8.noarch from katello and katello-common-4.10.0-1.el8.noarch from @System
  - cannot install both katello-common-4.11.0-1.el8.noarch from katello and katello-common-4.11.0-0.2.rc1.el8.noarch from katello
  - cannot install both katello-common-4.11.0-1.el8.noarch from katello and katello-common-4.11.0-0.2.rc2.el8.noarch from katello
  - cannot install the best update candidate for package tomcat-lib-1:9.0.62-12.el8.noarch
  - cannot install the best update candidate for package katello-common-4.10.0-1.el8.noarch
 Problem 5: problem with installed package candlepin-4.3.1-1.el8.noarch
  - package candlepin-4.3.1-1.el8.noarch from @System requires pki-servlet-engine, but none of the providers can be installed
  - package candlepin-4.3.1-1.el8.noarch from candlepin requires pki-servlet-engine, but none of the providers can be installed
  - package tomcat-1:9.0.62-12.el8.noarch from @System requires tomcat-lib = 1:9.0.62-12.el8, but none of the providers can be installed
  - package tomcat-lib-1:9.0.62-12.el8.noarch from @System requires tomcat-servlet-4.0-api = 1:9.0.62-12.el8, but none of the providers can be installed
  - package pki-servlet-engine-1:9.0.30-1.module_el8.4.0+595+e59c9af2.noarch from appstream requires pki-servlet-4.0-api = 1:9.0.30-1.module_el8.4.0+595+e59c9af2, but none of the providers can be installe$
  - package pki-servlet-engine-1:9.0.30-3.module_el8.5.0+854+e1c92b81.noarch from appstream requires pki-servlet-4.0-api = 1:9.0.30-3.module_el8.5.0+854+e1c92b81, but none of the providers can be installe$
  - package tomcat-servlet-4.0-api-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-4.0-api <= 1:9.0.50 provided by tomcat-servlet-4.0-api-1:9.0.62-12.el8.noarch from @System
  - cannot install both tomcat-servlet-4.0-api-1:9.0.62-29.el8.noarch from appstream and tomcat-servlet-4.0-api-1:9.0.62-12.el8.noarch from @System
  - package tomcat-servlet-4.0-api-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-4.0-api <= 1:9.0.50 provided by pki-servlet-4.0-api-1:9.0.30-1.module_el8.4.0+595+e59c9af2.noarch from ap
pstream
  - package tomcat-servlet-4.0-api-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-4.0-api <= 1:9.0.50 provided by pki-servlet-4.0-api-1:9.0.30-3.module_el8.5.0+854+e1c92b81.noarch from ap
pstream
  - cannot install the best update candidate for package tomcat-servlet-4.0-api-1:9.0.62-12.el8.noarch
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
user@fm01:~$ sudo dnf update --nobest

Re: the jinja2 error, were you unable to install https://yum.theforeman.org/pulpcore/3.39/el8/x86_64/python3.11-jinja2-3.1.2-4.el8.noarch.rpm from the Pulpcore 3.39 repository? Also, did you disable the Pulpcore module stream?

The Pulpcore 3.39 repository should’ve been enabled when you updated your katello release RPM.

I don’t really understand though how the Pulpcore 3.39 rpm would’ve been installable if the jinja2 dependency wasn’t installable.

I didn’t try manually installing python3.11-jinja2, I did disable the pulpcore repo as per the instructions. I rolled back to v3.8, where Foreman works but I still have the following dnf errors:

Hoping to get these errors resolved before trying to upgrade to v3.9 again. For the v3.7 to v3.8 upgrade I had to use the --nobest option.

user@fm01:~$ sudo dnf update
Last metadata expiration check: 0:10:20 ago on Wed 24 Jan 2024 23:34:22 CET.
Error:
 Problem 1: package candlepin-4.3.1-1.el8.noarch from @System requires pki-servlet-engine, but none of the providers can be installed
  - package tomcat-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by tomcat-1:9.0.62-12.el8.noarch from @System
  - cannot install both tomcat-1:9.0.62-29.el8.noarch from appstream and tomcat-1:9.0.62-12.el8.noarch from @System
  - package tomcat-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by pki-servlet-engine-1:9.0.30-1.module_el8.4.0+595+e59c9af2.noarch from appstream
  - package tomcat-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by pki-servlet-engine-1:9.0.30-3.module_el8.5.0+854+e1c92b81.noarch from appstream
  - cannot install the best update candidate for package tomcat-1:9.0.62-12.el8.noarch
  - cannot install the best update candidate for package candlepin-4.3.1-1.el8.noarch
 Problem 2: package katello-4.10.0-1.el8.noarch from @System requires candlepin >= 2.0, but none of the providers can be installed
  - package candlepin-4.3.1-1.el8.noarch from @System requires pki-servlet-engine, but none of the providers can be installed
  - package candlepin-4.3.1-1.el8.noarch from katello-candlepin requires pki-servlet-engine, but none of the providers can be installed
  - package tomcat-el-3.0-api-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by tomcat-1:9.0.62-12.el8.noarch from @System
  - package tomcat-el-3.0-api-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by pki-servlet-engine-1:9.0.30-1.module_el8.4.0+595+e59c9af2.noarch from appstream
  - package tomcat-el-3.0-api-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by pki-servlet-engine-1:9.0.30-3.module_el8.5.0+854+e1c92b81.noarch from appstream
  - cannot install the best update candidate for package tomcat-el-3.0-api-1:9.0.62-12.el8.noarch
  - cannot install the best update candidate for package katello-4.10.0-1.el8.noarch
 Problem 3: problem with installed package candlepin-4.3.1-1.el8.noarch
  - package candlepin-4.3.1-1.el8.noarch from @System requires pki-servlet-engine, but none of the providers can be installed
  - package candlepin-4.3.1-1.el8.noarch from katello-candlepin requires pki-servlet-engine, but none of the providers can be installed
  - package tomcat-jsp-2.3-api-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by tomcat-1:9.0.62-12.el8.noarch from @System
  - package tomcat-jsp-2.3-api-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by pki-servlet-engine-1:9.0.30-1.module_el8.4.0+595+e59c9af2.noarch from appstream
  - package tomcat-jsp-2.3-api-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by pki-servlet-engine-1:9.0.30-3.module_el8.5.0+854+e1c92b81.noarch from appstream
  - cannot install the best update candidate for package tomcat-jsp-2.3-api-1:9.0.62-12.el8.noarch
 Problem 4: problem with installed package katello-4.10.0-1.el8.noarch
  - package katello-4.10.0-1.el8.noarch from @System requires candlepin >= 2.0, but none of the providers can be installed
  - package katello-4.10.0-1.el8.noarch from katello requires candlepin >= 2.0, but none of the providers can be installed
  - package candlepin-4.3.1-1.el8.noarch from @System requires pki-servlet-engine, but none of the providers can be installed
  - package candlepin-4.3.1-1.el8.noarch from katello-candlepin requires pki-servlet-engine, but none of the providers can be installed
  - package tomcat-lib-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by tomcat-1:9.0.62-12.el8.noarch from @System
  - package tomcat-lib-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by pki-servlet-engine-1:9.0.30-1.module_el8.4.0+595+e59c9af2.noarch from appstream
  - package tomcat-lib-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by pki-servlet-engine-1:9.0.30-3.module_el8.5.0+854+e1c92b81.noarch from appstream
  - cannot install the best update candidate for package tomcat-lib-1:9.0.62-12.el8.noarch
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
1 Like

Hi @iballou ,
This issue is because jinja2 is 3.1.3 from foreman repo, but pulp only accept jinja2 <= 3.1.2.
I tried dnf downgrade python3.11-jinja2.noarch to 3.1.2; but, unfortunately, entire migration is broken. (shown below)

1 Like

Hi @tom we don’t have jinja2 3.1.3 published in our repo, if you take a look here, you will see that we have 3.1.2 with a release bumped to 4, generating jinja2-3.1.2-4.el8.noarch.rpm , https://github.com/theforeman/pulpcore-packaging/blob/rpm/3.39/packages/python-jinja2/python-jinja2.spec#L12

Do you have epel enabled on this server? I’m seeing python3.11-jinja2-3.1.3-1.el8.noarch.rpm published there.

1 Like

Does anyone have any idea how to resolve the following errors? I’d like to have dnf error-free before attempting another upgrade to v3.9. This is on Foreman v3.8.0:

user@fm01:~$ sudo dnf update
[sudo] password for dgeurts:
Last metadata expiration check: 3:39:50 ago on Thu 25 Jan 2024 11:30:32 CET.
Error:
 Problem 1: package candlepin-4.3.1-1.el8.noarch from @System requires pki-servlet-engine, but none of the providers can be installed
  - package tomcat-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by tomcat-1:9.0.62-12.el8.noarch from @System
  - cannot install both tomcat-1:9.0.62-29.el8.noarch from appstream and tomcat-1:9.0.62-12.el8.noarch from @System
  - package tomcat-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by pki-servlet-engine-1:9.0.30-1.module_el8.4.0+595+e59c9af2.noarch from appstream
  - package tomcat-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by pki-servlet-engine-1:9.0.30-3.module_el8.5.0+854+e1c92b81.noarch from appstream
  - cannot install the best update candidate for package tomcat-1:9.0.62-12.el8.noarch
  - cannot install the best update candidate for package candlepin-4.3.1-1.el8.noarch
 Problem 2: package katello-4.10.0-1.el8.noarch from @System requires candlepin >= 2.0, but none of the providers can be installed
  - package candlepin-4.3.1-1.el8.noarch from @System requires pki-servlet-engine, but none of the providers can be installed
  - package candlepin-4.3.1-1.el8.noarch from katello-candlepin requires pki-servlet-engine, but none of the providers can be installed
  - package tomcat-el-3.0-api-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by tomcat-1:9.0.62-12.el8.noarch from @System
  - package tomcat-el-3.0-api-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by pki-servlet-engine-1:9.0.30-1.module_el8.4.0+595+e59c9af2.noarch from appstream
  - package tomcat-el-3.0-api-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by pki-servlet-engine-1:9.0.30-3.module_el8.5.0+854+e1c92b81.noarch from appstream
  - cannot install the best update candidate for package tomcat-el-3.0-api-1:9.0.62-12.el8.noarch
  - cannot install the best update candidate for package katello-4.10.0-1.el8.noarch
 Problem 3: problem with installed package candlepin-4.3.1-1.el8.noarch
  - package candlepin-4.3.1-1.el8.noarch from @System requires pki-servlet-engine, but none of the providers can be installed
  - package candlepin-4.3.1-1.el8.noarch from katello-candlepin requires pki-servlet-engine, but none of the providers can be installed
  - package tomcat-jsp-2.3-api-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by tomcat-1:9.0.62-12.el8.noarch from @System
  - package tomcat-jsp-2.3-api-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by pki-servlet-engine-1:9.0.30-1.module_el8.4.0+595+e59c9af2.noarch from appstream
  - package tomcat-jsp-2.3-api-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by pki-servlet-engine-1:9.0.30-3.module_el8.5.0+854+e1c92b81.noarch from appstream
  - cannot install the best update candidate for package tomcat-jsp-2.3-api-1:9.0.62-12.el8.noarch
 Problem 4: problem with installed package katello-4.10.0-1.el8.noarch
  - package katello-4.10.0-1.el8.noarch from @System requires candlepin >= 2.0, but none of the providers can be installed
  - package katello-4.10.0-1.el8.noarch from katello requires candlepin >= 2.0, but none of the providers can be installed
  - package candlepin-4.3.1-1.el8.noarch from @System requires pki-servlet-engine, but none of the providers can be installed
  - package candlepin-4.3.1-1.el8.noarch from katello-candlepin requires pki-servlet-engine, but none of the providers can be installed
  - package tomcat-lib-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by tomcat-1:9.0.62-12.el8.noarch from @System
  - package tomcat-lib-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by pki-servlet-engine-1:9.0.30-1.module_el8.4.0+595+e59c9af2.noarch from appstream
  - package tomcat-lib-1:9.0.62-29.el8.noarch from appstream conflicts with pki-servlet-engine <= 1:9.0.50 provided by pki-servlet-engine-1:9.0.30-3.module_el8.5.0+854+e1c92b81.noarch from appstream
  - cannot install the best update candidate for package tomcat-lib-1:9.0.62-12.el8.noarch
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

I removed the tomcatjss package as it didn’t have any dependencies, and it would be easy to reinstall if required.

Can we see which module streams you have enabled? I’m guessing something is installed that is conflicting with the usual installation packages.

I just upgraded a basic Katello 4.9 to 4.10. My system doesn’t have tomcat installed on it, only tomcatjss. Do you specifically need tomcat for something?

My tomcat executable comes from pki-servlet-engine

Also I am able to reproduce the issue in a different way – I cannot install tomcat now that I’m upgraded to Katello 4.10.

Hi @Odilhao & @iballou

Below is my command:

dnf update https://yum.theforeman.org/releases/3.9/el8/x86_64/foreman-release.rpm
https://yum.theforeman.org/katello/4.11/katello/el8/x86_64/katello-repos-latest.rpm

dnf module disable pulpcore
dnf module enable katello:el8
foreman-maintain service stop
dnf update -y

The update ask me to install “python3.11-jinja2-3.1.3-1.el8.noarch.rpm” which seems not a fit version.
Could you advice on how to download correct version of jinja2-3.1.2-2.el8.noarch.rpm?

Thank you

The upgrade list from update foreman repo

HI @Odilhao @iballou ,

I tried to exclude jinja2 from upgrading to 3.1.3 by below command:

vim /etc/yum.conf
exclude=python3.11-jinja2* python39-jinja2*

Jinja2 remains at 3.1.2; however, the foreman install has same error like the last time I tried downgrading jinja2 from 3.1.3 to 3.1.2

Hi @Odilhao @iballou
My error is resolved by db: migration after downgrade ninja2. Thank you for your help

@iballou These are the enabled module streams. The server is an ipa-client, so that is a reason for having epel enabled.

user@fm01:~$ sudo dnf module list --enabled
Last metadata expiration check: 5:31:21 ago on Fri 26 Jan 2024 06:06:17 CET.
CentOS Stream 8 - AppStream
Name                                        Stream                              Profiles                                         Summary
ant                                         1.10 [d][e]                         common [d]                                       Java build tool
httpd                                       2.4 [d][e]                          common [d], devel, minimal                       Apache HTTP Server
idm                                         client [d][e]                       common [d]                                       RHEL IdM long term support client module
javapackages-runtime                        201801 [d][e]                       common [d]                                       Basic runtime utilities to support Java applications
maven                                       3.5 [d][e]                          common [d]                                       Java project management and project comprehension tool
mysql                                       8.0 [d][e]                          client, server [d]                               MySQL Module
perl                                        5.26 [d][e]                         common [d], minimal                              Practical Extraction and Report Language
perl-IO-Socket-SSL                          2.066 [d][e]                        common [d]                                       Perl library for transparent TLS
perl-libwww-perl                            6.34 [d][e]                         common [d]                                       A Perl interface to the World-Wide Web
pki-core                                    10.6 [e]                                                                             PKI Core module for PKI 10.6 or later
pki-deps                                    10.6 [e]                                                                             PKI Dependencies module for PKI 10.6 or later
postgresql                                  12 [e]                              client, server [d]                               PostgreSQL server and client module
python36                                    3.6 [d][e]                          build, common [d]                                Python programming language, version 3.6
python38                                    3.8 [d][e]                          build, common [d]                                Python programming language, version 3.8
python39                                    3.9 [d][e]                          build, common [d]                                Python programming language, version 3.9
redis                                       6 [e]                               common [d]                                       Redis persistent key-value database
ruby                                        2.7 [e]                             common [d]                                       An interpreter of object-oriented scripting language
virt                                        rhel [d][e]                         common [d]                                       Virtualization module

Foreman 3.8
Name                                        Stream                              Profiles                                         Summary
foreman                                     el8 [e]                             installer                                        Foreman module

Katello 4.10
Name                                        Stream                              Profiles                                         Summary
katello                                     el8 [e]                             installer                                        Katello module

CentOS Stream 8 - PowerTools
Name                                        Stream                              Profiles                                         Summary
javapackages-tools                          201801 [d][e]                       common [d]                                       Tools and macros for Java packaging support

pulpcore: Fetch, Upload, Organize, and Distribute Software Packages.
Name                                        Stream                              Profiles                                         Summary
pulpcore                                    el8 [e]                                                                              Pulpcore module

Hint: [d]efault, [e]nabled, [x]disabled, [i]installed

The repolist, apologies for the long list:

user@fm01:~$ dnf repolist -v
Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, groups-manager, needs-restarting, playground, repoclosure, repodiff, repograph, repomanage, reposync, system-upgrade
DNF version: 4.7.0
cachedir: /var/tmp/dnf-dgeurts-dj1t5ole
Last metadata expiration check: 0:03:51 ago on Thu 25 Jan 2024 14:58:44 CET.
Repo-id            : appstream
Repo-name          : CentOS Stream 8 - AppStream
Repo-revision      : 8-stream
Repo-distro-tags      : [cpe:/o:centos-stream:centos-stream:8]:  ,  , 8, C, O, S, S, a, e, e, m, n, r, t, t
Repo-updated       : Mon 22 Jan 2024 16:26:53 CET
Repo-pkgs          : 19,741
Repo-available-pkgs: 16,852
Repo-size          : 44 G
Repo-mirrors       : http://mirrorlist.centos.org/?release=8-stream&arch=x86_64&repo=AppStream&infra=stock
Repo-baseurl       : http://centos.cu.be/8-stream/AppStream/x86_64/os/ (9 more)
Repo-expire        : 172,800 second(s) (last: Thu 25 Jan 2024 14:58:42 CET)
Repo-filename      : /etc/yum.repos.d/CentOS-Stream-AppStream.repo

Repo-id            : baseos
Repo-name          : CentOS Stream 8 - BaseOS
Repo-revision      : 8-stream
Repo-distro-tags      : [cpe:/o:centos-stream:centos-stream:8]:  ,  , 8, C, O, S, S, a, e, e, m, n, r, t, t
Repo-updated       : Mon 22 Jan 2024 16:23:27 CET
Repo-pkgs          : 6,019
Repo-available-pkgs: 5,981
Repo-size          : 7.0 G
Repo-mirrors       : http://mirrorlist.centos.org/?release=8-stream&arch=x86_64&repo=BaseOS&infra=stock
Repo-baseurl       : http://mirrors.centos.behostings.net/centos/8-stream/BaseOS/x86_64/os/ (9 more)
Repo-expire        : 172,800 second(s) (last: Wed 24 Jan 2024 22:47:56 CET)
Repo-filename      : /etc/yum.repos.d/CentOS-Stream-BaseOS.repo

Repo-id            : epel
Repo-name          : Extra Packages for Enterprise Linux 8 - x86_64
Repo-revision      : 1706055957
Repo-updated       : Wed 24 Jan 2024 01:26:43 CET
Repo-pkgs          : 10,005
Repo-available-pkgs: 9,931
Repo-size          : 18 G
Repo-metalink      : https://mirrors.fedoraproject.org/metalink?repo=epel-8&arch=x86_64&infra=stock&content=centos
  Updated          : Wed 24 Jan 2024 22:48:01 CET
Repo-baseurl       : https://fedora.mirrorservice.org/epel/8/Everything/x86_64/ (240 more)
Repo-expire        : 172,800 second(s) (last: Wed 24 Jan 2024 22:48:01 CET)
Repo-filename      : /etc/yum.repos.d/epel.repo

Repo-id            : epel-next
Repo-name          : Extra Packages for Enterprise Linux 8 - Next - x86_64
Repo-revision      : 1693098199
Repo-updated       : Sun 27 Aug 2023 03:03:39 CEST
Repo-pkgs          : 40
Repo-available-pkgs: 40
Repo-size          : 87 M
Repo-metalink      : https://mirrors.fedoraproject.org/metalink?repo=epel-next-8&arch=x86_64&infra=stock&content=centos
  Updated          : Wed 24 Jan 2024 22:48:06 CET
Repo-baseurl       : https://fedora.cu.be/epel/next/8/Everything/x86_64/ (231 more)
Repo-expire        : 172,800 second(s) (last: Wed 24 Jan 2024 22:48:06 CET)
Repo-filename      : /etc/yum.repos.d/epel-next.repo

Repo-id            : extras
Repo-name          : CentOS Stream 8 - Extras
Repo-revision      : 1648559149
Repo-updated       : Tue 29 Mar 2022 15:05:49 CEST
Repo-pkgs          : 88
Repo-available-pkgs: 88
Repo-size          : 947 k
Repo-mirrors       : http://mirrorlist.centos.org/?release=8-stream&arch=x86_64&repo=extras&infra=stock
Repo-baseurl       : http://mirrors.centos.behostings.net/centos/8-stream/extras/x86_64/os/ (9 more)
Repo-expire        : 172,800 second(s) (last: Wed 24 Jan 2024 22:47:58 CET)
Repo-filename      : /etc/yum.repos.d/CentOS-Stream-Extras.repo

Repo-id            : extras-common
Repo-name          : CentOS Stream 8 - Extras common packages
Repo-revision      : 1693926330
Repo-updated       : Tue 05 Sep 2023 17:05:30 CEST
Repo-pkgs          : 29
Repo-available-pkgs: 29
Repo-size          : 339 k
Repo-mirrors       : http://mirrorlist.centos.org/?release=8-stream&arch=x86_64&repo=extras-extras-common
Repo-baseurl       : http://centos.cu.be/8-stream/extras/x86_64/extras-common/ (9 more)
Repo-expire        : 172,800 second(s) (last: Wed 24 Jan 2024 22:47:59 CET)
Repo-filename      : /etc/yum.repos.d/CentOS-Stream-Extras-common.repo

Repo-id            : foreman
Repo-name          : Foreman 3.8
Repo-revision      : 1697120833
Repo-updated       : Thu 12 Oct 2023 16:27:14 CEST
Repo-pkgs          : 577
Repo-available-pkgs: 577
Repo-size          : 293 M
Repo-baseurl       : https://yum.theforeman.org/releases/3.8/el8/x86_64
Repo-expire        : 172,800 second(s) (last: Thu 25 Jan 2024 14:58:43 CET)
Repo-filename      : /etc/yum.repos.d/foreman.repo

Repo-id            : foreman-plugins
Repo-name          : Foreman plugins 3.8
Repo-revision      : 1706132306
Repo-updated       : Wed 24 Jan 2024 22:38:26 CET
Repo-pkgs          : 392
Repo-available-pkgs: 391
Repo-size          : 209 M
Repo-baseurl       : https://yum.theforeman.org/plugins/3.8/el8/x86_64
Repo-expire        : 172,800 second(s) (last: Thu 25 Jan 2024 14:58:43 CET)
Repo-filename      : /etc/yum.repos.d/foreman-plugins.repo

Repo-id            : influxdb
Repo-name          : InfluxDB Repository - RHEL 8
Repo-revision      : 1705678990
Repo-updated       : Fri 19 Jan 2024 16:43:10 CET
Repo-pkgs          : 333
Repo-available-pkgs: 333
Repo-size          : 8.4 G
Repo-baseurl       : https://repos.influxdata.com/rhel/8/x86_64/stable
Repo-expire        : 172,800 second(s) (last: Wed 24 Jan 2024 22:48:07 CET)
Repo-filename      : /etc/yum.repos.d/influxdb.repo

Repo-id            : katello
Repo-name          : Katello 4.10
Repo-revision      : 1698276208
Repo-updated       : Thu 26 Oct 2023 01:23:28 CEST
Repo-pkgs          : 89
Repo-available-pkgs: 89
Repo-size          : 65 M
Repo-baseurl       : https://yum.theforeman.org/katello/4.10/katello/el8/x86_64/
Repo-expire        : 172,800 second(s) (last: Thu 25 Jan 2024 14:58:44 CET)
Repo-filename      : /etc/yum.repos.d/katello.repo

Repo-id            : katello-candlepin
Repo-name          : Candlepin: an open source entitlement management system.
Repo-revision      : 1698276226
Repo-updated       : Thu 26 Oct 2023 01:23:46 CEST
Repo-pkgs          : 2
Repo-available-pkgs: 2
Repo-size          : 68 M
Repo-baseurl       : https://yum.theforeman.org/katello/4.10/candlepin/el8/x86_64/
Repo-expire        : 172,800 second(s) (last: Thu 25 Jan 2024 14:58:44 CET)
Repo-filename      : /etc/yum.repos.d/katello.repo

Repo-id            : powertools
Repo-name          : CentOS Stream 8 - PowerTools
Repo-revision      : 8-stream
Repo-distro-tags      : [cpe:/o:centos-stream:centos-stream:8]:  ,  , 8, C, O, S, S, a, e, e, m, n, r, t, t
Repo-updated       : Mon 22 Jan 2024 16:27:55 CET
Repo-pkgs          : 4,672
Repo-available-pkgs: 4,124
Repo-size          : 32 G
Repo-mirrors       : http://mirrorlist.centos.org/?release=8-stream&arch=x86_64&repo=PowerTools&infra=stock
Repo-baseurl       : http://centos.cu.be/8-stream/PowerTools/x86_64/os/ (9 more)
Repo-expire        : 172,800 second(s) (last: Thu 25 Jan 2024 14:58:42 CET)
Repo-filename      : /etc/yum.repos.d/CentOS-Stream-PowerTools.repo

Repo-id            : pulpcore
Repo-name          : pulpcore: Fetch, Upload, Organize, and Distribute Software Packages.
Repo-revision      : 1705612987
Repo-updated       : Thu 18 Jan 2024 22:23:09 CET
Repo-pkgs          : 313
Repo-available-pkgs: 313
Repo-size          : 65 M
Repo-baseurl       : https://yum.theforeman.org/pulpcore/3.28/el8/x86_64/
Repo-expire        : 172,800 second(s) (last: Thu 25 Jan 2024 14:58:44 CET)
Repo-filename      : /etc/yum.repos.d/katello.repo

Repo-id            : puppet7
Repo-name          : Puppet 7 Repository el 8 - x86_64
Repo-revision      : 1705603055
Repo-updated       : Thu 18 Jan 2024 19:42:35 CET
Repo-pkgs          : 174
Repo-available-pkgs: 174
Repo-size          : 8.2 G
Repo-baseurl       : http://yum.puppet.com/puppet7/el/8/x86_64
Repo-expire        : 172,800 second(s) (last: Wed 24 Jan 2024 22:48:09 CET)
Repo-filename      : /etc/yum.repos.d/puppet7-release.repo
Total packages: 42,474

@iballou I’m not 100% sure how to verify what depends on tomcat, but the following shows that if I try to remove tomcat it also removes dependent package katello:

user@fm01:~$ sudo dnf remove tomcat
Dependencies resolved.
=====================================================================================
 Package        Architecture  Version                               Repository  Size
=====================================================================================
Removing:
 tomcat         noarch        1:9.0.62-12.el8                       @appstream  321 k
Removing dependent packages:
 katello        noarch        4.10.0-1.el8                          @katello    378
 tomcatjss      noarch        7.7.1-1.module_el8.6.0+1038+e795ee4b  @appstream  76 k
Removing unused dependencies:
  [...]

However, katello doesn’t show it depends on tomcat:

user@fm01:~$ sudo dnf repoquery --depends katello
Last metadata expiration check: 6:01:15 ago on Fri 26 Jan 2024 06:06:17 CET.
candlepin >= 2.0
candlepin-selinux >= 2.0
foreman-installer-katello
katello-common = 4.10.0-0.2.rc1.el8
katello-common = 4.10.0-0.2.rc2.el8
katello-common = 4.10.0-1.el8
rubygem-foreman_maintain >= 0.2.2
rubygem-katello
user@fm01:~$ sudo dnf repoquery --requires katello
Last metadata expiration check: 6:01:27 ago on Fri 26 Jan 2024 06:06:17 CET.
candlepin >= 2.0
candlepin-selinux >= 2.0
foreman-installer-katello
katello-common = 4.10.0-0.2.rc1.el8
katello-common = 4.10.0-0.2.rc2.el8
katello-common = 4.10.0-1.el8
rubygem-foreman_maintain >= 0.2.2
rubygem-katello

If I remove tomcat with sudo rpm -e --nodeps tomcat, then candlepin dies.

user@fm01:~$ sudo foreman-maintain service list
Running Service List
================================================================================
List applicable services:
dynflow-sidekiq@.service                   indirect
foreman-proxy.service                      enabled
foreman.service                            enabled
httpd.service                              enabled
postgresql.service                         enabled
pulpcore-api.service                       enabled
pulpcore-content.service                   enabled
pulpcore-worker@.service                   indirect
puppetserver.service                       enabled
redis.service                              enabled

All services listed                                                   [OK]
--------------------------------------------------------------------------------

Service status:

[...]
\ All services are running                                            [OK]
--------------------------------------------------------------------------------

But the health check fails:

user@fm01:~$ sudo foreman-maintain health check
Running ForemanMaintain::Scenario::FilteredScenario
================================================================================
Check number of fact names in database:                               [OK]
--------------------------------------------------------------------------------
Check whether all services are running:                               [OK]
--------------------------------------------------------------------------------
Check whether all services are running using the ping call:           [FAIL]
Some components are failing: candlepin, candlepin_auth, candlepin_events
--------------------------------------------------------------------------------
Continue with step [Restart applicable services]?, [y(yes), n(no)] y
Restart applicable services:

Restarting the following service(s):
postgresql
| All services restarted
\ Try 1/5: checking status of hammer ping
Some components are failing: candlepin, candlepin_auth, foreman_tasks, candlepin_events
- Try 2/5: checking status of hammer ping
Some components are failing: candlepin, candlepin_auth, foreman_tasks, candlepin_events
\ Try 3/5: checking status of hammer ping
Some components are failing: candlepin, candlepin_auth, candlepin_events
/ Waiting 30 seconds before retry.^C                                    [RUNNING]
--------------------------------------------------------------------------------

Rerunning the foreman katello installer then gives the following errors:

user@fm01:~$ sudo foreman-installer --scenario katello
2024-01-26 13:26:23 [NOTICE] [root] Loading installer configuration. This will take some time.
2024-01-26 13:26:26 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2024-01-26 13:26:26 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
2024-01-26 13:26:32 [NOTICE] [configure] Starting system configuration.
2024-01-26 13:26:43 [NOTICE] [configure] 250 configuration steps out of 1959 steps complete.
2024-01-26 13:26:48 [NOTICE] [configure] 500 configuration steps out of 1959 steps complete.
2024-01-26 13:26:50 [ERROR ] [configure] Could not set 'file' on ensure: No such file or directory - A directory component in /usr/share/tomcat/conf/login.config20240126-2645689-itu54l.lock does not exist
or is a dangling symbolic link (file: /usr/share/foreman-installer/modules/candlepin/manifests/artemis.pp, line: 15)
2024-01-26 13:26:50 [ERROR ] [configure] Could not set 'file' on ensure: No such file or directory - A directory component in /usr/share/tomcat/conf/login.config20240126-2645689-itu54l.lock does not exist
or is a dangling symbolic link (file: /usr/share/foreman-installer/modules/candlepin/manifests/artemis.pp, line: 15)
2024-01-26 13:26:50 [ERROR ] [configure] Wrapped exception:
2024-01-26 13:26:50 [ERROR ] [configure] No such file or directory - A directory component in /usr/share/tomcat/conf/login.config20240126-2645689-itu54l.lock does not exist or is a dangling symbolic link
2024-01-26 13:26:50 [ERROR ] [configure] /Stage[main]/Candlepin::Artemis/File[/usr/share/tomcat/conf/login.config]/ensure: change from 'absent' to 'file' failed: Could not set 'file' on ensure: No such file or directory - A directory component in /usr/share/tomcat/conf/login.config20240126-2645689-itu54l.lock does not exist or is a dangling symbolic link (file: /usr/share/foreman-installer/modules/candlepin/manifests/artemis.pp, line: 15)
2024-01-26 13:26:50 [ERROR ] [configure] Could not set 'file' on ensure: No such file or directory - A directory component in /usr/share/tomcat/conf/cert-users.properties20240126-2645689-hnudhu.lock does not exist or is a dangling symbolic link (file: /usr/share/foreman-installer/modules/candlepin/manifests/artemis.pp, line: 23)
2024-01-26 13:26:50 [ERROR ] [configure] Could not set 'file' on ensure: No such file or directory - A directory component in /usr/share/tomcat/conf/cert-users.properties20240126-2645689-hnudhu.lock does not exist or is a dangling symbolic link (file: /usr/share/foreman-installer/modules/candlepin/manifests/artemis.pp, line: 23)
2024-01-26 13:26:50 [ERROR ] [configure] Wrapped exception:
2024-01-26 13:26:50 [ERROR ] [configure] No such file or directory - A directory component in /usr/share/tomcat/conf/cert-users.properties20240126-2645689-hnudhu.lock does not exist or is a dangling symbolic link
2024-01-26 13:26:50 [ERROR ] [configure] /Stage[main]/Candlepin::Artemis/File[/usr/share/tomcat/conf/cert-users.properties]/ensure: change from 'absent' to 'file' failed: Could not set 'file' on ensure: No such file or directory - A directory component in /usr/share/tomcat/conf/cert-users.properties20240126-2645689-hnudhu.lock does not exist or is a dangling symbolic link (file: /usr/share/foreman-installer/modules/candlepin/manifests/artemis.pp, line: 23)
2024-01-26 13:26:50 [ERROR ] [configure] Could not set 'file' on ensure: No such file or directory - A directory component in /usr/share/tomcat/conf/cert-roles.properties20240126-2645689-1l5h0ck.lock does
not exist or is a dangling symbolic link (file: /usr/share/foreman-installer/modules/candlepin/manifests/artemis.pp, line: 31)
2024-01-26 13:26:50 [ERROR ] [configure] Could not set 'file' on ensure: No such file or directory - A directory component in /usr/share/tomcat/conf/cert-roles.properties20240126-2645689-1l5h0ck.lock does
not exist or is a dangling symbolic link (file: /usr/share/foreman-installer/modules/candlepin/manifests/artemis.pp, line: 31)
2024-01-26 13:26:50 [ERROR ] [configure] Wrapped exception:
2024-01-26 13:26:50 [ERROR ] [configure] No such file or directory - A directory component in /usr/share/tomcat/conf/cert-roles.properties20240126-2645689-1l5h0ck.lock does not exist or is a dangling symbolic link
2024-01-26 13:26:50 [ERROR ] [configure] /Stage[main]/Candlepin::Artemis/File[/usr/share/tomcat/conf/cert-roles.properties]/ensure: change from 'absent' to 'file' failed: Could not set 'file' on ensure: No such file or directory - A directory component in /usr/share/tomcat/conf/cert-roles.properties20240126-2645689-1l5h0ck.lock does not exist or is a dangling symbolic link (file: /usr/share/foreman-installer/modules/candlepin/manifests/artemis.pp, line: 31)
2024-01-26 13:26:50 [ERROR ] [configure] Could not set 'file' on ensure: No such file or directory - A directory component in /usr/share/tomcat/conf/conf.d/jaas.conf20240126-2645689-1dl30l3.lock does not exist or is a dangling symbolic link (file: /usr/share/foreman-installer/modules/candlepin/manifests/artemis.pp, line: 39)
2024-01-26 13:26:50 [ERROR ] [configure] Could not set 'file' on ensure: No such file or directory - A directory component in /usr/share/tomcat/conf/conf.d/jaas.conf20240126-2645689-1dl30l3.lock does not exist or is a dangling symbolic link (file: /usr/share/foreman-installer/modules/candlepin/manifests/artemis.pp, line: 39)
2024-01-26 13:26:50 [ERROR ] [configure] Wrapped exception:
2024-01-26 13:26:50 [ERROR ] [configure] No such file or directory - A directory component in /usr/share/tomcat/conf/conf.d/jaas.conf20240126-2645689-1dl30l3.lock does not exist or is a dangling symbolic link
2024-01-26 13:26:50 [ERROR ] [configure] /Stage[main]/Candlepin::Artemis/File[/usr/share/tomcat/conf/conf.d/jaas.conf]/ensure: change from 'absent' to 'file' failed: Could not set 'file' on ensure: No such file or directory - A directory component in /usr/share/tomcat/conf/conf.d/jaas.conf20240126-2645689-1dl30l3.lock does not exist or is a dangling symbolic link (file: /usr/share/foreman-installer/modules/candlepin/manifests/artemis.pp, line: 39)
2024-01-26 13:26:50 [NOTICE] [configure] 750 configuration steps out of 1964 steps complete.
2024-01-26 13:26:50 [NOTICE] [configure] 1000 configuration steps out of 1970 steps complete.
2024-01-26 13:26:50 [NOTICE] [configure] 1250 configuration steps out of 1971 steps complete.
2024-01-26 13:26:51 [NOTICE] [configure] 1500 configuration steps out of 1971 steps complete.
2024-01-26 13:27:05 [NOTICE] [configure] 1750 configuration steps out of 1971 steps complete.
2024-01-26 13:27:15 [NOTICE] [configure] System configuration has finished.

Error 1: Puppet File resource '/usr/share/tomcat/conf/login.config' failed. Logs:
  /Stage[main]/Candlepin::Artemis/File[/usr/share/tomcat/conf/login.config]
    Adding autorequire relationship with User[tomcat]
    Adding autorequire relationship with Group[tomcat]
    Starting to evaluate the resource (701 of 1962)
    Evaluated in 0.00 seconds
  /Stage[main]/Candlepin::Artemis/File[/usr/share/tomcat/conf/login.config]/ensure
    change from 'absent' to 'file' failed: Could not set 'file' on ensure: No such file or directory - A directory component in /usr/share/tomcat/conf/login.config20240126-2645689-itu54l.lock does not exist or is a dangling symbolic link (file: /usr/share/foreman-installer/modules/candlepin/manifests/artemis.pp, line: 15)
Error 2: Puppet File resource '/usr/share/tomcat/conf/cert-users.properties' failed. Logs:
  /Stage[main]/Candlepin::Artemis/File[/usr/share/tomcat/conf/cert-users.properties]
    Adding autorequire relationship with User[tomcat]
    Adding autorequire relationship with Group[tomcat]
    Starting to evaluate the resource (702 of 1962)
    Evaluated in 0.00 seconds
  /Stage[main]/Candlepin::Artemis/File[/usr/share/tomcat/conf/cert-users.properties]/ensure
    change from 'absent' to 'file' failed: Could not set 'file' on ensure: No such file or directory - A directory component in /usr/share/tomcat/conf/cert-users.properties20240126-2645689-hnudhu.lock does not exist or is a dangling symbolic link (file: /usr/share/foreman-installer/modules/candlepin/manifests/artemis.pp, line: 23)
Error 3: Puppet File resource '/usr/share/tomcat/conf/cert-roles.properties' failed. Logs:
  /Stage[main]/Candlepin::Artemis/File[/usr/share/tomcat/conf/cert-roles.properties]
    Adding autorequire relationship with User[tomcat]
    Adding autorequire relationship with Group[tomcat]
    Starting to evaluate the resource (703 of 1962)
    Evaluated in 0.00 seconds
  /Stage[main]/Candlepin::Artemis/File[/usr/share/tomcat/conf/cert-roles.properties]/ensure
    change from 'absent' to 'file' failed: Could not set 'file' on ensure: No such file or directory - A directory component in /usr/share/tomcat/conf/cert-roles.properties20240126-2645689-1l5h0ck.lock does not exist or is a dangling symbolic link (file: /usr/share/foreman-installer/modules/candlepin/manifests/artemis.pp, line: 31)
Error 4: Puppet File resource '/usr/share/tomcat/conf/conf.d/jaas.conf' failed. Logs:
  /Stage[main]/Candlepin::Artemis/File[/usr/share/tomcat/conf/conf.d/jaas.conf]
    Adding autorequire relationship with User[tomcat]
    Adding autorequire relationship with Group[tomcat]
    Starting to evaluate the resource (704 of 1962)
    Evaluated in 0.00 seconds
  /Stage[main]/Candlepin::Artemis/File[/usr/share/tomcat/conf/conf.d/jaas.conf]/ensure
    change from 'absent' to 'file' failed: Could not set 'file' on ensure: No such file or directory - A directory component in /usr/share/tomcat/conf/conf.d/jaas.conf20240126-2645689-1dl30l3.lock does not exist or is a dangling symbolic link (file: /usr/share/foreman-installer/modules/candlepin/manifests/artemis.pp, line: 39)

4 errors were detected.
Please address the errors and re-run the installer to ensure the system is properly configured.
Failing to do so is likely to result in broken functionality.

The full log is at /var/log/foreman-installer/katello.log

Surprisingly, without tomcat installed I could run a dnf update without issues and after that tomcat could be installed without upsetting anything. Meaning I have a Foreman 3.8 server with Katello and no dnf errors. Time to try to upgrade to v3.9 again.

No issues with the upgrade until running foreman-installer, where I appear to hit the same issue as @tom:

user@fm01:~$ sudo foreman-installer --scenario katello
2024-01-26 14:16:52 [NOTICE] [root] Loading installer configuration. This will take some time.
2024-01-26 14:16:55 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2024-01-26 14:16:55 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
2024-01-26 14:17:01 [NOTICE] [configure] Starting system configuration.
2024-01-26 14:17:15 [NOTICE] [configure] 250 configuration steps out of 1976 steps complete.
2024-01-26 14:17:16 [NOTICE] [configure] 500 configuration steps out of 1976 steps complete.
2024-01-26 14:17:18 [NOTICE] [configure] 750 configuration steps out of 1981 steps complete.
2024-01-26 14:17:19 [NOTICE] [configure] 1000 configuration steps out of 1986 steps complete.
2024-01-26 14:17:20 [NOTICE] [configure] 1250 configuration steps out of 1988 steps complete.
2024-01-26 14:17:34 [NOTICE] [configure] 1500 configuration steps out of 1988 steps complete.
2024-01-26 14:19:09 [NOTICE] [configure] 1750 configuration steps out of 1988 steps complete.
2024-01-26 14:19:11 [ERROR ] [configure] 'pulpcore-manager migrate --noinput' returned 1 instead of one of [0]
2024-01-26 14:19:11 [ERROR ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: change from 'notrun' to ['0'] failed: 'pulpcore
-manager migrate --noinput' returned 1 instead of one of [0]
2024-01-26 14:20:13 [NOTICE] [configure] System configuration has finished.

Error 1: Puppet Exec resource 'pulpcore-manager migrate --noinput' failed. Logs:
  /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]
    Adding autorequire relationship with File[/var/lib/pulp]
    Adding autorequire relationship with User[pulp]
    Starting to evaluate the resource (1831 of 1988)
    Evaluated in 1.03 seconds
  Exec[pulpcore-manager migrate --noinput](provider=posix)
    Executing check 'pulpcore-manager migrate --plan | grep "No planned migration operations"'
    Executing 'pulpcore-manager migrate --noinput'
  /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/unless
    Traceback (most recent call last):
      File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 581, in _build_master
        ws.require(__requires__)
      File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 909, in require
        needed = self.resolve(parse_requirements(requirements))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 800, in resolve
        raise VersionConflict(dist, req).with_context(dependent_req)
    pkg_resources.ContextualVersionConflict: (Jinja2 3.1.3 (/usr/lib/python3.11/site-packages), Requirement.parse('jinja2<=3.1.2,>=3.1'), {'pulpcore'})
        During handling of the above exception, another exception occurred:
        Traceback (most recent call last):
      File "/usr/bin/pulpcore-manager", line 33, in <module>
        sys.exit(load_entry_point('pulpcore==3.39.4', 'console_scripts', 'pulpcore-manager')())
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.11/site-packages/pulpcore/app/manage.py", line 11, in manage
        execute_from_command_line(sys.argv)
      File "/usr/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
        utility.execute()
      File "/usr/lib/python3.11/site-packages/django/core/management/__init__.py", line 382, in execute
        settings.INSTALLED_APPS
      File "/usr/lib/python3.11/site-packages/django/conf/__init__.py", line 102, in __getattr__
        self._setup(name)
      File "/usr/lib/python3.11/site-packages/django/conf/__init__.py", line 89, in _setup
        self._wrapped = Settings(settings_module)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.11/site-packages/django/conf/__init__.py", line 217, in __init__
        mod = importlib.import_module(self.SETTINGS_MODULE)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib64/python3.11/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
      File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 940, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "/usr/lib/python3.11/site-packages/pulpcore/app/settings.py", line 17, in <module>
        from pkg_resources import iter_entry_points
      File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3259, in <module>
        @_call_aside
         ^^^^^^^^^^^
      File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3234, in _call_aside
        f(*args, **kwargs)
      File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3272, in _initialize_master_working_set
        working_set = WorkingSet._build_master()
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 583, in _build_master
        return cls._build_from_requirements(__requires__)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 596, in _build_from_requirements
        dists = ws.resolve(reqs, Environment())
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 795, in resolve
        raise DistributionNotFound(req, requirers)
    pkg_resources.DistributionNotFound: The 'jinja2<=3.1.2,>=3.1' distribution was not found and is required by pulpcore
  /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns
    Traceback (most recent call last):
      File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 581, in _build_master
        ws.require(__requires__)
      File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 909, in require
        needed = self.resolve(parse_requirements(requirements))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 800, in resolve
        raise VersionConflict(dist, req).with_context(dependent_req)
    pkg_resources.ContextualVersionConflict: (Jinja2 3.1.3 (/usr/lib/python3.11/site-packages), Requirement.parse('jinja2<=3.1.2,>=3.1'), {'pulpcore'})
        During handling of the above exception, another exception occurred:
        Traceback (most recent call last):
      File "/usr/bin/pulpcore-manager", line 33, in <module>
        sys.exit(load_entry_point('pulpcore==3.39.4', 'console_scripts', 'pulpcore-manager')())
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.11/site-packages/pulpcore/app/manage.py", line 11, in manage
        execute_from_command_line(sys.argv)
      File "/usr/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
        utility.execute()
      File "/usr/lib/python3.11/site-packages/django/core/management/__init__.py", line 382, in execute
        settings.INSTALLED_APPS
      File "/usr/lib/python3.11/site-packages/django/conf/__init__.py", line 102, in __getattr__
        self._setup(name)
      File "/usr/lib/python3.11/site-packages/django/conf/__init__.py", line 89, in _setup
        self._wrapped = Settings(settings_module)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.11/site-packages/django/conf/__init__.py", line 217, in __init__
        mod = importlib.import_module(self.SETTINGS_MODULE)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib64/python3.11/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
      File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 940, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "/usr/lib/python3.11/site-packages/pulpcore/app/settings.py", line 17, in <module>
        from pkg_resources import iter_entry_points
      File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3259, in <module>
        @_call_aside
         ^^^^^^^^^^^
      File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3234, in _call_aside
        f(*args, **kwargs)
      File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3272, in _initialize_master_working_set
        working_set = WorkingSet._build_master()
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 583, in _build_master
        return cls._build_from_requirements(__requires__)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 596, in _build_from_requirements
        dists = ws.resolve(reqs, Environment())
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 795, in resolve
        raise DistributionNotFound(req, requirers)
    pkg_resources.DistributionNotFound: The 'jinja2<=3.1.2,>=3.1' distribution was not found and is required by pulpcore
    change from 'notrun' to ['0'] failed: 'pulpcore-manager migrate --noinput' returned 1 instead of one of [0]

1 error was detected during installation.
Please address the errors and re-run the installer to ensure the system is properly configured.
Failing to do so is likely to result in broken functionality.

The full log is at /var/log/foreman-installer/katello.log

Exploring the jinja packages available I get this, please excuse my lack of experience with dnf and CentOS, I’m more familiar with Debian derivatives:

user@fm01:~$ sudo dnf list installed | grep jinja
[sudo] password for dgeurts:
python3-jinja2.noarch         2.10.1-3.el8                        @appstream

user@fm01:~$ sudo dnf list | grep jinja
python3-jinja2.noarch         2.10.1-3.el8                        @appstream
python2-jinja2.noarch         2.10-9.module_el8+570+db61b4f9.     appstream
python3-jinja2-time.noarch    0.2.0-13.el8                        epel
python38-jinja2.noarch        2.11.3-1.module_el8+617+b8038191    appstream

So I’m not sure which package to try to downgrade to.

Maybe you should create a separate repo for the ipa-client related packages Foreman can use since EPEL is not supported.

1 Like

You have epel enabled on this server, we do not support epel for Katello installation, and this jinja2 version mismatch is one of the reasons, epel will update packages ahead of us and this can cause problems.

https://docs.theforeman.org/3.9/Installing_Server/index-katello.html#supported-operating-systems_foreman

It’s nice that it worked out in the end.

1 Like

@tedevil @Odilhao Ah, that would explain the headache! That was my own stupid fault then…

I’ll need to consider if it’s worth creating a custom repo or if I need the packages installed from epel.

Rolling back to v3.8, thank goodness for snapshots, I disabled the epel and epel-next repos, and then tried the upgrade again. This time it went flawlessly. What had confused me was that the python3.11-jinja2 package only showed up when looking for installed packages with rpm and not when using dnf.

I’ve removed epel repos, to avoid temptation, and have cleared out the packages installed from epel. Turns out that I had enabled epel for some of my standard tools: htop nmon byobu netcat, not ipa-client.

All is well now. Next, I need to work out how to create an epel repo in Foreman and create a filtered view…

Thank you all for your help, highly appreciated!