Leapp inplace upgrade fails from Rocky 8 to 9 - dnf dependency errors with python3.11-pulp-rpm, python3.11-pulpcore, python3.11-cryptography, python3.11-pyparsing

Problem:
My Foreman server is running on Rocky Linux 8, and I want to use the leapp tool to upgrade it to Rocky Linux 9.
The release of Foreman/Katello should remain the same (3.12), just changing from el8 to el9.

When I run leapp preupgrade, dnf shows dependency errors.
I had prepared the system, before starting the upgrade, and dnf update didn’t have any updates (nor errors) before I started.
These are the dependency errors:

# leapp preupgrade --no-rhsm
[ ... ]
============================================================
                           ERRORS                           
============================================================

2024-12-20 15:17:59.772652 [ERROR] Actor: dnf_transaction_check
Message: DNF execution failed with non zero exit code.
Summary:
    Stdout: Last metadata expiration check: 0:01:36 ago on Fri Dec 20 15:16:20 2024.
            Package candlepin-4.4.20-1.el8.noarch is already installed.
            Package candlepin-selinux-4.4.20-1.el8.noarch is already installed.
            Package foreman-3.12.1-1.el8.noarch is already installed.
            Package foreman-installer-1:3.12.1-1.el8.noarch is already installed.
            Package foreman-installer-katello-1:3.12.1-1.el8.noarch is already installed.
            Package foreman-proxy-3.12.1-1.el8.noarch is already installed.
            Package foreman-selinux-3.12.1-1.el8.noarch is already installed.
            Package katello-4.14.1-1.el8.noarch is already installed.
            Package katello-selinux-5.0.2-1.el8.noarch is already installed.
            Package postgresql-13.18-1.module+el8.10.0+1898+8409d9ae.x86_64 is already installed.
            Package postgresql-contrib-13.18-1.module+el8.10.0+1898+8409d9ae.x86_64 is already installed.
            Package postgresql-evr-0.0.2-3.el8.noarch is already installed.
            Package postgresql-server-13.18-1.module+el8.10.0+1898+8409d9ae.x86_64 is already installed.
            Package pulpcore-selinux-2.0.1-1.el8.x86_64 is already installed.
            Package python3.11-pulp-ansible-1:0.21.8-1.el8.noarch is already installed.
            Package python3.11-pulp-cli-0.29.2-2.el8.noarch is already installed.
            Package python3.11-pulp-container-2.20.3-1.el8.noarch is already installed.
            Package python3.11-pulp-deb-3.2.1-1.el8.noarch is already installed.
            Package python3.11-pulp-glue-0.29.2-2.el8.noarch is already installed.
            Package python3.11-pulp-python-3.11.3-1.el8.noarch is already installed.
            Package python3.11-pulp-rpm-3.26.1-1.el8.noarch is already installed.
            Package python3.11-pulpcore-3.49.22-1.el8.noarch is already installed.
            Package rubygem-foreman-tasks-9.2.3-1.fm3_12.el8.noarch is already installed.
            Package rubygem-foreman_ansible-14.2.1-1.fm3_12.el8.noarch is already installed.
            Package rubygem-foreman_maintain-1:1.7.6-1.el8.noarch is already installed.
            Package rubygem-foreman_remote_execution-13.2.5-1.fm3_12.el8.noarch is already installed.
            Package rubygem-hammer_cli-3.12.0-1.el8.noarch is already installed.
            Package rubygem-hammer_cli_foreman-3.12.0-1.el8.noarch is already installed.
            Package rubygem-hammer_cli_foreman_ansible-0.7.0-1.fm3_11.el8.noarch is already installed.
            Package rubygem-hammer_cli_foreman_remote_execution-0.3.0-1.fm3_10.el8.noarch is already installed.
            Package rubygem-hammer_cli_foreman_tasks-0.0.21-1.fm3_11.el8.noarch is already installed.
            Package rubygem-hammer_cli_katello-1.14.3-1.el8.noarch is already installed.
            Package rubygem-katello-4.14.1-1.el8.noarch is already installed.
            Package rubygem-smart_proxy_ansible-3.5.6-1.fm3_12.el8.noarch is already installed.
            Package rubygem-smart_proxy_dynflow-0.9.3-1.fm3_12.el8.noarch is already installed.
            Package rubygem-smart_proxy_pulp-3.3.0-1.fm3_10.el8.noarch is already installed.
            Package rubygem-smart_proxy_remote_execution_ssh-0.11.4-1.fm3_12.el8.noarch is already installed.
    Stderr: warning: Found bdb_ro Packages database while attempting sqlite backend: using bdb_ro backend.
            No matches found for the following disable plugin patterns: subscription-manager
            Repository baseos is listed more than once in the configuration
            Repository baseos-debuginfo is listed more than once in the configuration
            Repository baseos-source is listed more than once in the configuration
            Repository appstream is listed more than once in the configuration
            Repository appstream-debuginfo is listed more than once in the configuration
            Repository appstream-source is listed more than once in the configuration
            Repository nfv is listed more than once in the configuration
            Repository rt is listed more than once in the configuration
            Repository devel is listed more than once in the configuration
            Repository extras is listed more than once in the configuration
            Repository plus is listed more than once in the configuration
            warning: Found bdb_ro Packages database while attempting sqlite backend: using bdb_ro backend.
            Warning: Package marked by Leapp to install not found in repositories metadata: openssl-fips-provider
            Warning: Package marked by Leapp to upgrade not found in repositories metadata: gpg-pubkey leapp python3-leapp
            Transaction check: 
            
             Problem 1: package python3.11-pulp-rpm-3.26.1-1.el8.noarch from @System requires python3.11-createrepo_c >= 1.1.0, but none of the providers can be installed
              - package python3.11-createrepo_c-1.1.3-1.el8.x86_64 from @System requires libdrpm.so.0()(64bit), but none of the providers can be installed
              - conflicting requests
             Problem 2: package python3.11-pulpcore-3.49.22-1.el8.noarch from @System requires python3.11-cryptography >= 38.0.1, but none of the providers can be installed
              - python3.11-cryptography-42.0.8-1.el8.x86_64 from @System  does not belong to a distupgrade repository
              - conflicting requests
             Problem 3: package python3.11-pulpcore-3.49.22-1.el8.noarch from @System requires python3.11-pyparsing >= 3.1.0, but none of the providers can be installed
              - package pulpcore-selinux-2.0.1-1.el8.x86_64 from @System requires pulpcore, but none of the providers can be installed
              - python3.11-pyparsing-3.1.1-4.el8.noarch from @System  does not belong to a distupgrade repository
              - conflicting requests
             Problem 4: cannot install the best update candidate for package python3.11-cryptography-42.0.8-1.el8.x86_64
              - cannot install both python3.11-cryptography-37.0.2-6.el9.x86_64 from rocky9-appstream and python3.11-cryptography-42.0.8-1.el8.x86_64 from @System
              - package python3.11-pulpcore-3.49.22-1.el8.noarch from @System requires python3.11-cryptography >= 38.0.1, but none of the providers can be installed
              - package python3.11-pulp-ansible-1:0.21.8-1.el8.noarch from @System requires python3.11-pulpcore >= 3.49.0, but none of the providers can be installed
              - package python3.11-pulp-ansible-1:0.21.8-1.el8.noarch from @System requires python3.11-pulpcore < 3.55, but none of the providers can be installed
              - conflicting requests
             Problem 5: cannot install the best update candidate for package python3.11-pyparsing-3.1.1-4.el8.noarch
              - cannot install both python3.11-pyparsing-2.4.7-4.el9.noarch from leapp-foreman-plugins and python3.11-pyparsing-3.1.1-4.el8.noarch from @System
              - package python3.11-pulpcore-3.49.22-1.el8.noarch from @System requires python3.11-pyparsing >= 3.1.0, but none of the providers can be installed
              - package python3.11-pulp-container-2.20.3-1.el8.noarch from @System requires python3.11-pulpcore >= 3.49.0, but none of the providers can be installed
              - package python3.11-pulp-container-2.20.3-1.el8.noarch from @System requires python3.11-pulpcore < 3.55, but none of the providers can be installed
              - conflicting requests
    Hint: If there was a problem reaching remote content (see stderr output) and proxy is configured in the YUM/DNF configuration file, the proxy configuration is likely causing this error. Make sure the proxy is properly configured in /etc/dnf/dnf.conf. It's also possible the proxy settings in the DNF configuration file are incompatible with the target system. A compatible configuration can be placed in /etc/leapp/files/dnf.conf which, if present, it will be used during some parts of the upgrade instead of original /etc/dnf/dnf.conf. In such case the configuration will also be applied to the target system. Note that /etc/dnf/dnf.conf needs to be still configured correctly for your current system to pass the early phases of the upgrade process.
[ ... ]

How can these be resolved?

Expected outcome:
There should not be any dependency errors.

Foreman and Proxy versions:
3.12.1

Foreman and Proxy plugin versions:

Name Version
foreman-tasks 9.2.3
foreman_ansible 14.2.1
foreman_remote_execution 13.2.5
katello 4.14.1

Distribution and version:
NAME=“Rocky Linux”
VERSION=“8.10 (Green Obsidian)”

Other relevant data:
I used the following documentation:
https://docs.theforeman.org/3.12/Upgrading_Project/index-foreman-el.html#upgrading_EL_on_foreman_or_proxy_upgrading-connected

You seem to have Katello installed, but used the Foreman upgrade instructions, which miss the Katello-related repos.

Try these please: Upgrading Foreman to 3.12

(the diff is really just the list of repos you add to leapp)

1 Like

Many thanks!
This is the correct solution.

1 Like