Leapp preupgrade fails on Satellite server behind web proxy
Environment
- Red Hat Satellite 6.11
- Red Hat Enterprise Linux 7.9
Issue
- Running the
leapp preupgradecommand on a Satellite server yields the following error:
[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', '--setenv=LEAPP_UPGRADE_PATH_TARGET_RELEASE=8.6', '--setenv=LEAPP_NO_RHSM=0', '--setenv=LEAPP_EXPERIMENTAL=0', '--setenv=LEAPP_UPGRADE_PATH_FLAVOUR=default', '--setenv=LEAPP_COMMON_TOOLS=:/etc/leapp/repos.d/system_upgrade/el7toel8/tools', '--setenv=LEAPP_COMMON_FILES=:/etc/leapp/repos.d/system_upgrade/common/files:/etc/leapp/repos.d/system_upgrade/el7toel8/files', '--setenv=LEAPP_IPU_IN_PROGRESS=7to8', '--setenv=LEAPP_UNSUPPORTED=0', '--setenv=LEAPP_EXECUTION_ID=9ec32874-4554-4975-a678-c4d201644e95', '--setenv=LEAPP_HOSTNAME=$EXAMPLE_HOSTNAME', 'dnf', 'install', '-y', '--nogpgcheck', '--setopt=module_platform_id=platform:el8', '--setopt=keepcache=1', '--releasever', u'8.6', '--installroot', '/el8target', '--disablerepo', '*', '--enablerepo', u'rhel-8-for-x86_64-baseos-rpms', '--enablerepo', u'satellite-maintenance-6.11-for-rhel-8-x86_64-rpms', '--enablerepo', u'satellite-6.11-for-rhel-8-x86_64-rpms', '--enablerepo', u'rhel-8-for-x86_64-highavailability-rpms', '--enablerepo', u'rhel-8-for-x86_64-appstream-rpms', 'dnf', 'dnf-command(config-manager)'] failed with exit code 1.
Stderr: Failed to create directory /var/lib/leapp/scratch/mounts/root_/system_overlay//sys/fs/selinux: Read-only file system
Failed to create directory /var/lib/leapp/scratch/mounts/root_/system_overlay//sys/fs/selinux: Read-only file system
Host and machine ids are equal (fe21229597a3492b99cbdd9d8ef86f86): refusing to link journals
Failed to synchronize cache for repo 'rhel-8-for-x86_64-highavailability-rpms', ignoring this repo.
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-baseos-rpms', ignoring this repo.
Failed to synchronize cache for repo 'satellite-maintenance-6.11-for-rhel-8-x86_64-rpms', ignoring this repo.
Failed to synchronize cache for repo 'satellite-6.11-for-rhel-8-x86_64-rpms', ignoring this repo.
Error: Unable to find a match: dnf dnf-command(config-manager)
Resolution
-
Set the $LEAPP_PROXY_HOST environment variable:
export LEAPP_PROXY_HOST="http://your.proxy.server.url"1.1) In case of the need to use password and user:
export LEAPP_PROXY_HOST="http://USERNAME:PASS@your.proxy.server.url:<PORT>"where USERNAME is the username, and PASS is the password used to login to your proxy server.
-
Rerun the
leapp preupgradecommand.
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
- Leapp requires its own proxy setting to download the Leapp utility metadata
- This proxy configuration is separate from the proxy setting for Red Hat Subscription Manager (RHSM) under
/etc/rhsm/rhsm.conf
Diagnostic Steps
- Run,
echo $LEAPP_PROXY_HOST - Result of the above command is an empty string
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.