Running leapp upgrade on Content Hosts registered with Red Hat Satellite 6 fails with Message: Unable to install RHEL X userspace packages.

Solution Verified - Updated

Environment

  • Red Hat Satellite 6
  • Red Hat Enterprise Linux
    • 7.9
    • 8.10
    • 9.4
    • 9.6
    • 9.7
    • 10.1

Issue

  • Upgrading RHEL-7.9 Content Hosts registered with Red Hat Satellite 6 to RHEL-8.10 using leapp fails with the below error:

       2020-01-01 00:00:00.12345 [ERROR] Actor: target_userspace_creator
    Message: Unable to install RHEL 8 userspace packages.
    Summary:
           Details: Command ['systemd-nspawn', '--register=no', '--quiet', '-D', '/var/lib/leapp/scratch/mounts/root_/system_overlay', '--bind=/etc/hosts:/etc/hosts', '--setenv=LEAPP_NO_RHSM=0', '--setenv=LEAPP_EXPERIMENTAL=0', '
       --
       setenv=LEAPP_COMMON_TOOLS=:/etc/leapp/repos.d/system_upgrade/el7toel8/tools', '
       --
       setenv=LEAPP_COMMON_FILES=:/etc/leapp/repos.d/system_upgrade/el7toel8/files', '--setenv=LEAPP_UNSUPPORTED=0', '--setenv=LEAPP_EXECUTION_ID=123456-abcd-efgh-7890-7dd0123456789', '--setenv=LEAPP_HOSTNAME=client.example.com', 'dnf', 'install', '-y', '--nogpgcheck', '--setopt=module_platform_id=platform:el8', '--setopt=keepcache=1', '--releasever', u'8.10', '--installroot','/el8target', '--disablerepo', '*', '--enablerepo', u'rhel-8-for-x86_64-baseos-rpms', '--enablerepo', u'rhel-8-for-x86_64-appstream-rpms', '--enablerepo', u'rhel-8-for-x86_64-supplementary-rpms', '--enablerepo', u'rhel-8-for-x86_64-baseos-rpms', '--enablerepo',u'rhel-8-for-x86_64-appstream-rpms', '--enablerepo', u'rhel-8-for-x86_64-appstream-rpms', '--enablerepo', u'rhel-8-for-x86_64-baseos-rpms', 'dnf'] failed with exit code 1.
           Stderr: Host and machine ids are equal
       (123a45678b901234c567d8901234efg5): refusing to link journals
                   Failed to synchronize cache for repo 'rhel-8-for-x86_64-appstream-rpms', ignoring this repo.
                   Failed to synchronize cache for repo 'rhel-8-for-x86_64-supplementary-rpms', ignoring this repo.
                   Failed to synchronize cache for repo 'rhel-8-for-x86_64-baseos-rpms', ignoring this repo.
                   Error: Unable to find a match: dnf
    

    Or, the error message will be as following:

    2020-01-01 00:00:00.12345 [ERROR] Actor: target_userspace_creator
    Message: Cannot find required basic RHEL 8 repositories.
    
  • A similar error was reported when users were trying to perform an in-place upgrade from RHEL 8.10 to the RHEL 9.X operating system as well:

    Risk Factor: high
    Title: Unable to install RHEL 9 userspace packages.
    Summary: {"details": "Command ['systemd-nspawn', '--register=no', '--quiet', '--keep-unit', '--capability=all', '-D', '/var/lib/leapp/scratch/mounts/root_/system_overlay', '--setenv=LEAPP_HOSTNAME=client.example.com', '--setenv=LEAPP_EXPERIMENTAL=0', '--setenv=LEAPP_UNSUPPORTED=0', '--setenv=LEAPP_NO_RHSM=0', '--setenv=LEAPP_UPGRADE_PATH_TARGET_RELEASE=9.5', '--setenv=LEAPP_UPGRADE_PATH_FLAVOUR=default', '--setenv=LEAPP_IPU_IN_PROGRESS=8to9', '--setenv=LEAPP_EXECUTION_ID=e853b20e-af72-4819-ac3a-5abe1c0e0b40', '--setenv=LEAPP_COMMON_TOOLS=:/etc/leapp/repos.d/system_upgrade/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', 'dnf', 'install', '-y', '--setopt=module_platform_id=platform:el9', '--setopt=keepcache=1', '--releasever', '9.5', '--installroot', '/el9target', '--disablerepo', '*', '--enablerepo', 'rhel-9-for-x86_64-appstream-rpms', '--enablerepo', 'rhel-9-for-x86_64-baseos-rpms', 'crypto-policies-scripts', 'kpatch-dnf', 'dnf', 'dnf-command(config-manager)'] failed with exit code 1.", "stderr": "Host and machine ids are equal (b15dcf0b0f4e4f3cb26d20acb8434929): refusing to link journals\nErrors during downloading metadata for repository 'rhel-9-for-x86_64-baseos-rpms':\n  - Status code: 404 for https://satellite.example.com/pulp/content/My_Org/Library/RHEL_CV/content/dist/rhel9/9.5/x86_64/baseos/os/repodata/repomd.xml (IP: X.X.X.X)\nError: Failed to download metadata for repo 'rhel-9-for-x86_64-baseos-rpms': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried\n"}
    Key: 0e5d8451adfe372b923058fd09028cb5356e733d
    
  • Upgrade fails with the following error:

     1. Actor: target_userspace_creator
     Message: Unable to install RHEL 9 userspace packages.
    

Or, the error message will be as following:

   Risk Factor: high (inhibitor)
Title: Cannot find required basic RHEL target repositories.
  • A similar error was reported when users were trying to perform an in-place upgrade from RHEL 9.7 to the RHEL 10.X operating system as well:

    Risk Factor: high (error)
    Title: Unable to install RHEL 10 userspace packages.
    Summary: {"details": "Command ['systemd-nspawn', '--register=no', '--quiet', '--keep-unit', '--capability=all', '--pipe', '-D', '/var/lib/leapp/scratch/mounts/root_/system_overlay', '--setenv=LEAPP_HOSTNAME=client.example.com', '--setenv=LEAPP_EXPERIMENTAL=0', '--setenv=LEAPP_UNSUPPORTED=0', '--setenv=LEAPP_NO_RHSM=0', '--setenv=LEAPP_TARGET_PRODUCT_CHANNEL=ga', '--setenv=LEAPP_UPGRADE_PATH_TARGET_RELEASE=10.1', '--setenv=LEAPP_UPGRADE_PATH_FLAVOUR=default', '--setenv=LEAPP_IPU_IN_PROGRESS=9to10', '--setenv=LEAPP_EXECUTION_ID=68f1e3ce-280f-415c-8dc3-9877b69b08b8', '--setenv=LEAPP_COMMON_TOOLS=:/etc/leapp/repos.d/system_upgrade/common/tools:/etc/leapp/repos.d/system_upgrade/el9toel10/tools', '--setenv=LEAPP_COMMON_FILES=:/etc/leapp/repos.d/system_upgrade/common/files:/etc/leapp/repos.d/system_upgrade/el9toel10/files', 'dnf', 'install', '-y', '--setopt=module_platform_id=platform:el10', '--setopt=keepcache=1', '--releasever', '10.1', '--installroot', '/el10target', '--disablerepo', '*', '--enablerepo', 'rhel-10-for-x86_64-appstream-rpms', '--enablerepo', 'rhel-10-for-x86_64-baseos-rpms', 'dnf-command(config-manager)', 'dnf', 'util-linux'] failed with exit code 1.", "stderr": "Host and machine ids are equal (7d65ce28ea904102a2c79be63d9da402): refusing to link journals
    Errors during downloading metadata for repository 'rhel-10-for-x86_64-baseos-rpms':
      - Status code: 404 for https://satellite.example.com/pulp/content/My_Org/Library/RHEL_CV/content/dist/rhel10/10.1/x86_64/baseos/os/repodata/repomd.xml (IP: X.X.X.X)
    Error: Failed to download metadata for repo 'rhel-10-for-x86_64-baseos-rpms': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
    "}
    

Or, the error message will be as following:

 2026-01-21 15:31:57.119987 [ERROR] Actor: target_userspace_creator
 Message: Unable to install RHEL 10 userspace packages.

Resolution

  • The required repositories for RHEL 8.10 upgrade are as mentioned below:

1)Red Hat Enterprise Linux 8 for x86_64 - AppStream RPMs x86_64 8.10
2)Red Hat Enterprise Linux 8 for x86_64 - BaseOS RPMs x86_64 8.10

  • The required repositories for RHEL9.6 upgrade are as mentioned below:
  1. Red Hat Enterprise Linux 9 for x86_64 - BaseOS (RPMs) x86_64 9.6
  2. Red Hat Enterprise Linux 9 for x86_64 - AppStream (RPMs) x86_64 9.6
  • The required repositories for RHEL9.7 upgrade are as mentioned below:
  1. Red Hat Enterprise Linux 9 for x86_64 - BaseOS (RPMs) x86_64 9.7
  2. Red Hat Enterprise Linux 9 for x86_64 - AppStream (RPMs) x86_64 9.7
  • The required repositories for RHEL10.1 upgrade are as mentioned below:
  1. Red Hat Enterprise Linux 10 for x86_64 - BaseOS (RPMs) x86_64 10.1
  2. Red Hat Enterprise Linux 10 for x86_64 - AppStream (RPMs) x86_64 10.1
  • Ensure the repositories being made available to the Content Host belongs to version 8.10 and not to version 8 or not any other minor version RHEL-8.

  • If a host is connected to a content-view, ensure that the required RHEL 7 and RHEL 8.10 based repositories are part of the same content-view, or else the leapp upgrade will fail to find the 8.10 specific repos during pre-upgrade check or actual upgrade.

  • If a host is connected to a content-view, ensure that the required RHEL 8.10 and RHEL 9.6 based repositories are part of the same content view, or else the leapp upgrade will fail to find the RHEL 9.6 specific repositories during the leapp preupgrade check.

  • If a host is connected to a content-view, ensure that the required RHEL 8.10 and RHEL 9.7 based repositories are part of the same content view, or else the leapp upgrade will fail to find the RHEL 9.7 specific repositories during the leapp preupgrade check.

  • If a host is connected to a content-view, ensure that the required RHEL 9.7 and RHEL 10.1 based repositories are part of the same content view, or else the leapp upgrade will fail to find the RHEL 10.1 specific repositories during the leapp preupgrade check.

  • The same statements apply for any RHEL 8.X to RHEL 9.X as well as any RHEL 7.9 to RHEL 8.X in-place upgrade activity as well.

  • To validate the availability of the target version, execute the command below on the host server.

    # subscription-manager release --list
    
  • Always verify on the client side that /etc/yum.conf has plugins=1 and not in plugins=0.

  • Ensure that leapp packages are updated to their latest available versions before initiating the upgrade.

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

Root Cause

  • The RHEL 8 based repositories were not part of the same content-view view which was assigned to the host. Please refer to the following KCS on how to accomplish this:
    RHEL 7 to RHEL 8 LEAP Upgrade Failing When Using Satellite

  • The Red Hat Enterprise Linux 8 for x86_64- App stream RPMs and Red Hat Enterprise Linux 8 for x86_64- BaseOS RPMs repository made available to the Content Hosts belong to version 8.

SBR
Components
Category

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.