[Satellite 6.x] Upgrading a RHEL 7.9 content host to RHEL 8 via Red Hat Satellite fails with an 'Unable to use yum successfully' error

Solution Verified - Updated

Environment

  • Red Hat Satellite 6.x
  • Red Hat Enterprise Linux 7.x

Issue

While upgrading a RHEL 7.9 content host to RHEL 8 via satellite following the Red Hat recommendations here, when executing the command:

# leapp preupgrade

the following error is returned:

============================================================
                           ERRORS
============================================================

2021-01-29 15:08:52.432483 [ERROR] Actor: scan_subscription_manager_info
Message: Unable to use yum successfully
Summary:
    Details: Command ['yum', 'clean', 'all'] failed with exit code 1.
    Stderr: There are no enabled repos.
             Run "yum repolist all" to see the repos you have.
             To enable Red Hat Subscription Management repositories:
                 subscription-manager repos --enable <repo>
             To enable custom repositories:
                 yum-config-manager --enable <repo>

============================================================
                       END OF ERRORS
============================================================

Resolution

According to Chapter 2. Preparing a RHEL 7 system for the upgrade of the UPGRADING FROM RHEL 7 TO RHEL 8 guide, if the system to be upgraded is registered to Satellite Server, ensure that Satellite meets the following conditions:

Note: Follow RHEL 8 minor versions as per documentation. We expect those to be the latest released RHEL 8 version that has Extended Update Support available.

  1. Satellite has a subscription manifest with RHEL 8 repositories imported.

  2. The following repositories are enabled and synchronized with the latest updates, and published on Satellite:

    • Red Hat Enterprise Linux 7 Server RPMs x86_64 7 or Red Hat Enterprise Linux 7 Server RPMs x86_64 7.9
    • Red Hat Enterprise Linux 7 Server - Extras (RPMs)
    • Red Hat Enterprise Linux 8 for x86_64 - AppStream RPMs x86_64 8.4
    • Red Hat Enterprise Linux 8 for x86_64 - BaseOS RPMs x86_64 8.4
  3. The content host belongs to one of the following:

    • A Content View containing the above RHEL 7 and RHEL 8 repositories.
    • The Default Organization View Content View and the Library life cycle environment.

For more KB articles/solutions related to Red Hat Satellite 6.x LEAPP Issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x LEAPP Issues

Diagnostic Steps

  • Use the following command to identify the Content View and life cycle environment associated with the affected content host:
# subscription-manager identity
  • Use the following command to check what yum repositories are enabled on the affected content host:
# yum -C repolist
SBR
Components

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.