Upgrading from RHEL 7.9 to RHEL 8.x failed

Latest response

Hello,

I'm trying to upgrade one of our test systems from RHEL 7.9 to 8.x version using Leapp. I have successfully resolved Leapp preupgrade errors but when I execute "leapp upgrade" command fails with the following errors:

STDERR:
Warning: Packages marked by Leapp for install not found in repositories metadata: python3-nss ldns-utils rpcgen python3-pyxattr gdk-pixbuf2-xlib ivy-local python3-javapackages libnsl2-devel rpcsvc-proto-devel
Warning: Packages marked by Leapp for upgrade not found in repositories metadata: gpg-pubkey
RPM: warning: Generating 6 missing index(es), please wait...
Error: Transaction test error:
  file /usr/lib/python2.7/site-packages/ipaddress.py from install of python2-ipaddress-1.0.18-6.module+el8.1.0+3111+de3f2d8e.noarch conflicts with file from package python-ipaddress-1.0.16-2.el7.noarch
  file /usr/lib/python2.7/site-packages/ipaddress.pyc from install of python2-ipaddress-1.0.18-6.module+el8.1.0+3111+de3f2d8e.noarch conflicts with file from package python-ipaddress-1.0.16-2.el7.noarch
  file /usr/lib/python2.7/site-packages/ipaddress.pyo from install of python2-ipaddress-1.0.18-6.module+el8.1.0+3111+de3f2d8e.noarch conflicts with file from package python-ipaddress-1.0.16-2.el7.noarch

Responses

Hi Dusko,

As your issue is not clear to me, I have a few questions that might help others to dig into the issue:

  • What repositories are you using?
    • CDN of Red Hat or a RH Satellite?
  • Are you using the version 14 of the leapp-data.tgz?
  • Are you "Leapping" to RHEL 8.1 instead of 8.4?
    • if so why?

Regards,

Jan Gerrit Kootstra

Hi Jan,

I will provide additional info in order to better understand the issue. As per guide Upgrading from RHEL 7 to RHEL 8 I have enabled the following repositories:

# subscription-manager repos --enable rhel-7-server-rpms
# subscription-manager repos --enable rhel-7-server-extras-rpms

Then I have set the release number to 7.9 by using subscription-manager, updated system and rebooted it

# subscription-manager release --set=7.9
# yum update
# reboot

After that I have installed leapp and leapp-repository packages, downloaded and placed leapp-data14.tar.gz to appropriate location and run "leapp preupgrade" command

# yum install leapp leapp-repository
# tar -xzf leapp-data14.tar.gz -C /etc/leapp/files && rm leapp-data14.tar.gz
# leapp preupgrade

On the first run preupgrade check detected three inhibitor problems (pata_acpi kernel module, remote root login and pkcs11 module check).

I have resolved those problem by removing kernel module (rmmod pata_acpi), allowing root login by editing /etc/ssh/sshd_config and running command from documentation to disable pkcs11 module check.

After that "leapp preupgrade" run successfully although in report file there where some "Risk factor: High" warning about packages which where not signed by RHEL. I believe that this may be the consequence of me using "epel" repository to install for example "htop" package.

Risk Factor: high
Title: Packages not signed by Red Hat found on the system
Summary: The following packages have not been signed by Red Hat and may be removed during the upgrade process in case Red Hat-signed packages to be removed during the upgrade depend on them:
- certbot
- cgdcbxd
- cifs-utils
- compat-db-headers
- compat-db47
- compat-exiv2-023
- compat-glibc
- compat-glibc-headers
- compat-libcap1
- compat-libf2c-34
- compat-libgfortran-41
- compat-libtiff3
- compat-openldap
- epel-release
- gpg-pubkey
- hesiod
- htop
- hwloc
- hwloc-libs
- libhugetlbfs
- libhugetlbfs-utils
- libpng12
- libsemanage
- libsemanage-python
- libsepol
- perl-Sys-Syslog
- pyparsing
- python-cffi
- python-enum34
- python-idna
- python-ipaddress
- python-kmod
- python-ndg_httpsclient
- python-ply
- python-pycparser
- python-requests-toolbelt
- python-urwid
- python-zope-component
- python-zope-event
- python-zope-interface
- python2-acme
- python2-certbot
- python2-configargparse
- python2-cryptography
- python2-distro
- python2-future
- python2-josepy
- python2-mock
- python2-parsedatetime
- python2-pyasn1
- python2-pyrfc3339
- python2-six
- setools-libs
Key: 13f0791ae5f19f50e7d0d606fb6501f91b1efb2c

If some more info is needed I will gladly provide it.

After all those things I have run command to upgrade system and it failed showing error which I have posted in first post.

# leapp upgrade

I have not "leaped" to RHEL 8.1 as I was not aware that I can set custom release to "leapp" to so I supposed that the default options would "leapp" my system to RHEL 8.4.

Upon further investigating package "python-ipaddress-1.0.16-2.el7.noarch" which is mentioned in the error message I have noticed that the mentioned package comes from "centos" repo and not " rhel-7-server-rpms" and I don't know if that could cause errors.

=============================================================================================================================================================================================
 Package                                                       Arch                        Version                                  Repository                                          Size
=============================================================================================================================================================================================
Removing:
 python-ipaddress                                              noarch                      1.0.16-2.el7                             @centos                                            227 k
Removing for dependencies:
 anaconda-core                                                 x86_64                      21.48.22.159-1.el7                       @rhel-7-server-rpms                                8.2 M
 anaconda-gui                                                  x86_64                      21.48.22.159-1.el7                       @rhel-7-server-rpms                                1.5 M
 anaconda-tui                                                  x86_64                      21.48.22.159-1.el7                       @rhel-7-server-rpms                                447 k
 certbot                                                       noarch                      0.39.0-1.el7                             @/certbot-0.39.0-1.el7.noarch                       89 k
 initial-setup                                                 x86_64                      0.3.9.45-1.el7                           @rhel-7-server-rpms                                222 k
 initial-setup-gui                                             x86_64                      0.3.9.45-1.el7                           @rhel-7-server-rpms                                 32 k
 insights-client                                               noarch                      3.1.5-1.el7_9                            @rhel-7-server-rpms                                1.3 M
 leapp                                                         noarch                      0.12.1-1.el7_9                           @rhel-7-server-extras-rpms                          93 k
 leapp-deps                                                    noarch                      0.12.1-1.el7_9                           @rhel-7-server-extras-rpms                         0.0
 leapp-repository                                              noarch                      0.14.0-4.el7_9                           @rhel-7-server-extras-rpms                         1.7 M
 leapp-repository-deps                                         noarch                      0.14.0-4.el7_9                           @rhel-7-server-extras-rpms                         0.0
 python-backports-ssl_match_hostname                           noarch                      3.5.0.1-1.el7                            @rhel-7-server-rpms                                 18 k
 python-coverage                                               x86_64                      3.6-0.5.b3.el7                           @anaconda/7.4                                      568 k
 python-ndg_httpsclient                                        noarch                      0.3.2-1.el7                              @epel                                              129 k
 python-requests                                               noarch                      2.6.0-10.el7                             @rhel-7-server-rpms                                341 k
 python-requests-toolbelt                                      noarch                      0.8.0-1.el7                              @epel                                              277 k
 python-setuptools                                             noarch                      0.9.8-7.el7                              @anaconda/7.4                                      1.9 M
 python-urllib3                                                noarch                      1.10.2-7.el7                             @rhel-7-server-rpms                                380 k
 python2-acme                                                  noarch                      0.39.0-1.el7                             @epel                                              678 k
 python2-certbot                                               noarch                      0.39.0-1.el7                             @epel                                              2.7 M
 python2-cryptography                                          x86_64                      1.7.2-2.el7                              @centos                                            2.6 M
 python2-josepy                                                noarch                      1.2.0-1.el7                              @epel                                              329 k
 python2-leapp                                                 noarch                      0.12.1-1.el7_9                           @rhel-7-server-extras-rpms                         618 k
 subscription-manager                                          x86_64                      1.24.48-1.el7_9                          @rhel-7-server-rpms                                4.4 M
 subscription-manager-gui                                      x86_64                      1.24.48-1.el7_9                          @rhel-7-server-rpms                                210 k
 subscription-manager-initial-setup-addon                      x86_64                      1.24.48-1.el7_9                          @rhel-7-server-rpms                                 47 k

Transaction Summary
=============================================================================================================================================================================================

I have resolved this issue.

It appears that the problem was that packages "python-ipaddress" and "python-idna" where installed from EPEL repo.

I have run command "yum reinstall python-ipaddress python-idna" after which packages where installed from rhel-7-server-rpms and after that leapp upgrade went successfully.

Maybe this will be useful to someone who faces similar problems.

Hi Dusko,

Please mark your latest post as best responds, so people will find your solution.

Leapp is known to have issues with non-Red Hat packages.

Regards.

Jan Gerrit

I'm having this exact issue, but after removing will not reinstall, getting package not found even with proper repos enabled. I have some 40 or so packages with conflicts.

Warning: Packages marked by Leapp for upgrade not found in repositories metadata: gpg-pubkey leapp-upgrade-el7toel8 leapp python2-leapp
RPM: warning: Generating 6 missing index(es), please wait...
Error: Transaction test error:
  file /usr/lib/python3.6/site-packages/__pycache__/six.cpython-36.opt-1.pyc from install of python3-six-1.11.0-8.el8.noarch conflicts with file from package python36-six-1.14.0-3.el7.noarch
  file /usr/lib/python3.6/site-packages/__pycache__/six.cpython-36.pyc from install of python3-six-1.11.0-8.el8.noarch conflicts with file from package python36-six-1.14.0-3.el7.noarch
  file /usr/lib/python3.6/site-packages/six.py from install of python3-six-1.11.0-8.el8.noarch conflicts with file from package python36-six-1.14.0-3.el7.noarch
  file /usr/lib/python3.6/site-packages/dateutil/__init__.py from install of python3-dateutil-1:2.6.1-6.el8.noarch conflicts with file from package python36-dateutil-1:2.4.2-5.el7.noarch

I have the same error in conversion from CentOS7 to Virtuozzo. The first major issue I have is: Failed to initialize NSS libraries then this :

Problem 1: package python3-abrt-addon-2.10.9-20.vl8.1.x86_64 requires abrt = 2.10.9-20.vl8.1, but none of the providers can be installed - cannot install the best candidate for the job - nothing provides libjson-c.so.4(libjson-c.so.4)(64bit) needed by abrt-2.10.9-20.vl8.1.x86_64 Problem 2: package python3-abrt-2.10.9-20.vl8.1.x86_64 requires abrt = 2.10.9-20.vl8.1, but none of the providers can be installed - cannot install the best candidate for the job - nothing provides libjson-c.so.4(libjson-c.so.4)(64bit) needed by abrt-2.10.9-20.vl8.1.x86_64

I will appreciate any support.

Hello how are you ? I am trying to upgrade from rhel8 to 9, when I run leapp preupgrade --target 9.0 it doesn't give any error, but when I run leapp upgrade --target 9.0 I get the following error

STDERR: warning: Found bdb_ro Packages database while attempting sqlite backend: using bdb_ro backend. warning: Found bdb_ro Packages database while attempting sqlite backend: using bdb_ro backend. Warning: Package marked by Leapp to upgrade not found in repositories metadata: gpg-pubkey leapp-upgrade-el8toel9 python3-leapp leapp warning: Found bdb_ro Packages database while attempting sqlite backend: using bdb_ro backend. error: rpmdbNextIterator: skipping h# 902 Header V3 RSA/SHA1 Signature, key ID bdda8475: BAD Header SHA256 digest: OK Header SHA1 digest: OK error: rpmdbNextIterator: skipping h# 902 Header V3 RSA/SHA1 Signature, key ID bdda8475: BAD Header SHA256 digest: OK Header SHA1 digest: OK Error: An rpm exception occurred: package not installed

============================================================

END OF ERRORS

Debug output written to /var/log/leapp/leapp-upgrade.log

============================================================

REPORT

A report has been generated at /var/log/leapp/leapp-report.json A report has been generated at /var/log/leapp/leapp-report.txt

============================================================

END OF REPORT

Answerfile has been generated at /var/log/leapp/answerfile

Content /var/log/leapp/leapp-upgrade.log 2022-06-22 17:25:21.280 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: You can remove cached packages by executing 'dnf clean packages'. 2022-06-22 17:25:21.284 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: Error: An rpm exception occurred: package not installed 2022-06-22 17:25:21.339 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: Command ['systemd-nspawn', '--register=no', '--quiet', '--keep-unit', '--capability=all', '-D', '/var/lib/leapp/el9userspace', '--setenv=LEAPP_HOSTNAME=dborgi.cabal.coop.py', '--setenv=LEAPP_EXPERIMENTAL=0', '--setenv=LEAPP_UNSUPPORTED=0', '--setenv=LEAPP_NO_RHSM=0', '--setenv=LEAPP_UPGRADE_PATH_TARGET_RELEASE=9.0', '--setenv=LEAPP_UPGRADE_PATH_FLAVOUR=default', '--setenv=LEAPP_IPU_IN_PROGRESS=8to9', '--setenv=LEAPP_EXECUTION_ID=4ed65b08-8657-4082-88bb-9736c99e4536', '--setenv=LEAPP_COMMON_TOOLS=:/etc/leapp/repos.d/system_upgrade/el8toel9/tools', '--setenv=LEAPP_COMMON_FILES=:/etc/leapp/repos.d/system_upgrade/common/files:/etc/leapp/repos.d/system_upgrade/el8toel9/files', '/usr/bin/dnf', 'rhel-upgrade', 'download', '/var/lib/leapp/dnf-plugin-data.txt'] failed with exit code 1. 2022-06-22 17:25:21.343 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has finished: ['systemd-nspawn', '--register=no', '--quiet', '--keep-unit', '--capability=all', '-D', '/var/lib/leapp/el9userspace', '--setenv=LEAPP_HOSTNAME=dborgi.cabal.coop.py', '--setenv=LEAPP_EXPERIMENTAL=0', '--setenv=LEAPP_UNSUPPORTED=0', '--setenv=LEAPP_NO_RHSM=0', '--setenv=LEAPP_UPGRADE_PATH_TARGET_RELEASE=9.0', '--setenv=LEAPP_UPGRADE_PATH_FLAVOUR=default', '--setenv=LEAPP_IPU_IN_PROGRESS=8to9', '--setenv=LEAPP_EXECUTION_ID=4ed65b08-8657-4082-88bb-9736c99e4536', '--setenv=LEAPP_COMMON_TOOLS=:/etc/leapp/repos.d/system_upgrade/el8toel9/tools', '--setenv=LEAPP_COMMON_FILES=:/etc/leapp/repos.d/system_upgrade/common/files:/etc/leapp/repos.d/system_upgrade/el8toel9/files', '/usr/bin/dnf', 'rhel-upgrade', 'download', '/var/lib/leapp/dnf-plugin-data.txt'] 2022-06-22 17:25:21.344 ERROR PID: 14749 leapp.workflow.Download.dnf_package_download: DNF execution failed: 2022-06-22 17:25:21.345 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has started: ['umount', '-fl', '/var/lib/leapp/scratch/mounts/root_/system_overlay/var/cache/dnf'] 2022-06-22 17:25:21.358 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has finished: ['umount', '-fl', '/var/lib/leapp/scratch/mounts/root_/system_overlay/var/cache/dnf'] 2022-06-22 17:25:21.358 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has started: ['rm', '-rf', '/var/lib/leapp/scratch/mounts/root_/system_overlay/var/cache/dnf'] 2022-06-22 17:25:21.364 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has finished: ['rm', '-rf', '/var/lib/leapp/scratch/mounts/root_/system_overlay/var/cache/dnf'] 2022-06-22 17:25:21.365 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has started: ['umount', '-fl', '/var/lib/leapp/scratch/mounts/root_/system_overlay/boot'] 2022-06-22 17:25:21.381 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has finished: ['umount', '-fl', '/var/lib/leapp/scratch/mounts/root_/system_overlay/boot'] 2022-06-22 17:25:21.381 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has started: ['rm', '-rf', '/var/lib/leapp/scratch/mounts/root_/system_overlay/boot'] 2022-06-22 17:25:21.386 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has finished: ['rm', '-rf', '/var/lib/leapp/scratch/mounts/root_/system_overlay/boot'] 2022-06-22 17:25:21.386 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has started: ['umount', '-fl', '/var/lib/leapp/scratch/mounts/root_boot/root_boot'] 2022-06-22 17:25:21.407 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has finished: ['umount', '-fl', '/var/lib/leapp/scratch/mounts/root_boot/root_boot'] 2022-06-22 17:25:21.407 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has started: ['rm', '-rf', '/var/lib/leapp/scratch/mounts/root_boot/upper'] 2022-06-22 17:25:21.412 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has finished: ['rm', '-rf', '/var/lib/leapp/scratch/mounts/root_boot/upper'] 2022-06-22 17:25:21.412 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has started: ['rm', '-rf', '/var/lib/leapp/scratch/mounts/root_boot/work'] 2022-06-22 17:25:21.417 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has finished: ['rm', '-rf', '/var/lib/leapp/scratch/mounts/root_boot/work'] 2022-06-22 17:25:21.417 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has started: ['rm', '-rf', '/var/lib/leapp/scratch/mounts/root_boot/root_boot'] 2022-06-22 17:25:21.421 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has finished: ['rm', '-rf', '/var/lib/leapp/scratch/mounts/root_boot/root_boot'] 2022-06-22 17:25:21.422 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has started: ['umount', '-fl', '/var/lib/leapp/el9userspace/installroot'] 2022-06-22 17:25:21.439 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has finished: ['umount', '-fl', '/var/lib/leapp/el9userspace/installroot'] 2022-06-22 17:25:21.440 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has started: ['rm', '-rf', '/var/lib/leapp/el9userspace/installroot'] 2022-06-22 17:25:21.444 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has finished: ['rm', '-rf', '/var/lib/leapp/el9userspace/installroot'] 2022-06-22 17:25:21.445 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has started: ['umount', '-fl', '/var/lib/leapp/scratch/mounts/root_/system_overlay'] 2022-06-22 17:25:21.473 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has finished: ['umount', '-fl', '/var/lib/leapp/scratch/mounts/root_/system_overlay'] 2022-06-22 17:25:21.473 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has started: ['rm', '-rf', '/var/lib/leapp/scratch/mounts/root_/upper'] 2022-06-22 17:25:21.478 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has finished: ['rm', '-rf', '/var/lib/leapp/scratch/mounts/root_/upper'] 2022-06-22 17:25:21.478 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has started: ['rm', '-rf', '/var/lib/leapp/scratch/mounts/root_/work'] 2022-06-22 17:25:21.483 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has finished: ['rm', '-rf', '/var/lib/leapp/scratch/mounts/root_/work'] 2022-06-22 17:25:21.484 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has started: ['rm', '-rf', '/var/lib/leapp/scratch/mounts/root_/system_overlay'] 2022-06-22 17:25:21.488 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: External command has finished: ['rm', '-rf', '/var/lib/leapp/scratch/mounts/root_/system_overlay'] 2022-06-22 17:25:21.489 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: Cleaning up mounts 2022-06-22 17:25:21.489 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: Recursively removing scratch directory /var/lib/leapp/scratch. 2022-06-22 17:25:21.490 DEBUG PID: 14749 leapp.workflow.Download.dnf_package_download: Recursively removed scratch directory /var/lib/leapp/scratch. 2022-06-22 17:25:21.503 INFO PID: 8497 leapp.workflow.Download: Starting stage After of phase Download 2022-06-22 17:25:21.504 INFO PID: 8497 leapp.workflow: Workflow interrupted due to the FailPhase error policy 2022-06-22 17:25:21.524 INFO PID: 8497 leapp: Answerfile will be created at /var/log/leapp/answerfile 2022-06-22 17:25:21.546 WARNING PID: 8497 leapp.reporting: Stable Key report entry not provided, dynamically generating one - 9d0ad2570f4aa34f0db5643deb920bebe03271d5 2022-06-22 17:25:21.659 WARNING PID: 8497 leapp.reporting: Stable Key report entry not provided, dynamically generating one - 9d0ad2570f4aa34f0db5643deb920bebe03271d5

Please someone can help me thanks