Guided Solution

Objectives

  • Investigate why the RHEL 8 server upgrade to RHEL 9 via Leapp is failing in Red Hat Satellite 6.

  • Solve the upgrade issue in the hands-on lab environment.

Instructions

Run following instructions on rhel81 system with root as user.

Sample output:
[ec2-user@rhel81 ~]$ sudo su -
[root@rhel81 ~]#
  1. Try to list the available repos on the client and it fails with:

    subscription-manager repos
    Sample output:
    Repositories disabled by configuration.
  2. Change the value of manage_repos in /etc/rhsm/rhsm.conf to 1 instead of 0.

    Sample output:
    [root@rhel81 ~]# cat /etc/rhsm/rhsm.conf | grep -i manage_repos
    manage_repos = 1
  3. Run subscription-manager refresh command to refresh the repo data.

    subscription-manager refresh
    Sample output:
    All local data refreshed
  4. Install the leapp utility via dnf install leapp-upgrade and then run leapp preupgrade.

    dnf install leapp-upgrade -y
    leapp preupgrade
    Sample output:
    ...
    ...
    2025-02-10 10:57:15.999198 [ERROR] Actor: target_userspace_creator
    Message: Unable to install RHEL 9 userspace packages.
    ...
    ...
    ...
  5. Sync and add the 9.x minor appstream and baseos repos to the content view:

    1. Get the satellite console details and credentials from Lab Access Details under Info tab from the demo platform.

    2. Login to satellite web console.

    3. Navigate to Content select Content  Red Hat Repositories.

    4. Search with rhel-9-for-x86_64-baseos-rpms and click rhel-9-for-x86_64-baseos-rpms to view drop down options.

    5. Click on the + beside x86_64 9.4 to enable baseos for 9.4 minor version or the supported minor version as per this doc

      baseos94
      Tip: click on the image to open in a new tab for better visibility
  6. Perform the previous steps for appstream as well:

    1. Login to satellite web console.

    2. Navigate to Content select Content  Red Hat Repositories.

    3. Search with rhel-9-for-x86_64-appstream-rpms and click rhel-9-for-x86_64-appstream-rpms to view drop down options.

    4. Click on the + beside x86_64 9.4 to enable appstream for 9.4 minor version or the supported minor version as per this doc

      appstream94
      Tip: click on the image to open in a new tab for better visibility
    5. Navigate to Content select Content  Sync Status and click Expand all.

    6. Click on the checkbox for appstream and baseos for 9.4 and click Synchronize Now at the bottom.

      sync
      Tip: click on the image to open in a new tab for better visibility
  7. Now add baseos and appstream for 9.4 repos to the content view:

    1. Content  LifeCycle  Content Views

    2. Click on leapp_8to9 content view and then navigate to Repositories tab.

    3. Select the Status filter as Not added.

    4. Select the Red Hat Enterprise Linux 9 for x86_64 - AppStream RPMs 9.4 and Red Hat Enterprise Linux 9 for x86_64 - BaseOS RPMs 9.4 repos and then click Add repositories

      addpublish
      Tip: click on the image to open in a new tab for better visibility
    5. Click Publish new version and then Next and Finish to publish a new version of this content view.

      publish
      Tip: click on the image to open in a new tab for better visibility
  8. Run leapp preupgrade now.

    leapp preupgrade
    Sample output:
    ...
    ...
    OSError: [Errno 24] Too many open files
    ...
    ...
    sqlite3.OperationalError: unable to open database file
    ...
    ...
  9. Run the below command to set the ulimit.

    ulimit -n 16384
  10. Run leapp preupgrade again.

    leapp preupgrade
    Sample output:
    ...
    ...
    Complete!
    ...
    Reports summary:
        Errors:              0
        Inhibitors:          0
    ...
    ...
  11. Once the leapp preupgrade completes with 0 errors and 0 inhibitors , run the leapp upgrade.

    leapp upgrade
    Sample output:
    ...
    ...
    file /usr/lib64/engines-3/afalg.so from install of openssl-libs-1:3.0.7-28.el9_4.x86_64 conflicts with file from package openssl3-libs-3.2.2-2.1.el8.x86_64
    ...
    ...
  12. The openssl3-libs-3.2.2-2.1.el8.x86_64 rpm is installed from EPEL repo and hence needs to be removed to fix this error.

    yum remove openssl3-libs-3.2.2-2.1.el8.x86_64 -y
  13. Run the leapp upgrade again.

    leapp upgrade
    Sample output:
    ...
    ...
    
    Complete!
    ====> * add_upgrade_boot_entry
            Add new boot entry for Leapp provided initramfs.
    A reboot is required to continue. Please reboot your system.
    ...
    ...
  14. Once leapp upgrade is successful and it prompts for reboot; reboot the system and confirm that the server is now booted with RHEL 9 kernel.

    Sample output:
    [root@rhel81 ~]# reboot
    Shared connection to rhel81 closed.
    This will take 15-20 minutes to reflect the changes.
    Sample output:
    [ec2-user@rhel81 ~]$ cat /etc/redhat-release
    Red Hat Enterprise Linux release 9.4 (Plow)