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 -

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: 10.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.
    

Environment

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

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content