Bug 2223545

Summary: Leapp is unable to find the target RHEL 9 Appstream/BaseOS repositories in GCP PAYG RHEL 8 systems using RHUI
Product: Red Hat Enterprise Linux 8 Reporter: Jesús Pérez Martínez <jeperez>
Component: leapp-repositoryAssignee: Petr Stodulka <pstodulk>
Status: CLOSED CURRENTRELEASE QA Contact: Upgrades and Supportability <upgrades-and-supportability>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.8CC: pmocary
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-28 13:37:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jesús Pérez Martínez 2023-07-18 07:33:19 UTC
Description of problem:
Leapp preupgrade is unable to find the target RHEL 9 Appstream and BaseOS repositories in RHEL 8 GCP PAYG systems using RHUI.

Following the same steps in RHEL 7 GCP PAYG systems, it works as expected.

Version-Release number of selected component (if applicable):
leapp-rhui-google-1.0.0-1.el8.noarch


How reproducible:
Always

Steps to Reproduce:
1. Do the standard preupgrade preparation of the system.
2. Install RHUI client following our documentation: https://access.redhat.com/articles/6981918
3. Run Leapp preupgrade without rhsm: leapp preupgrade --no-rhsm

Actual results:
Preupgrade fails with:
~~~
2023-07-11 20:06:56.912613 [ERROR] Actor: target_userspace_creator
Message: 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=test.localhost', '--setenv=LEAPP_EXPERIMENTAL=0', '--setenv=LEAPP_UNSUPPORTED=0', '--setenv=LEAPP_NO_RHSM=1', '--setenv=LEAPP_NO_RHSM_FACTS=1', '--setenv=LEAPP_UPGRADE_PATH_TARGET_RELEASE=9.2', '--setenv=LEAPP_UPGRADE_PATH_FLAVOUR=default', '--setenv=LEAPP_IPU_IN_PROGRESS=8to9', '--setenv=LEAPP_EXECUTION_ID=b380f188-b5ed-49e0-aae8-8ef1b348c63b', '--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.2', '--installroot', '/el9target', '--disablerepo', '*', '--enablerepo', 'google-compute-engine-leapp', 'google-rhui-client-rhel9', 'dnf-command(config-manager)', 'dnf', '--disableplugin', 'subscription-manager'] failed with exit code 1.
    Stderr: Host and machine ids are equal (eb19b2ed0e9a713494880fd61cadd743): refusing to link journals
            No matches found for the following disable plugin patterns: subscription-manager
            Error: Unable to find a match: dnf-command(config-manager) dnf
~~~

Additional info:

Adding both AppStream and BaseOS RHEL 9 repositories to "/etc/leapp/files/leapp_upgrade_repositories.repo" fixes the issue.

Comment 1 Peter Močáry 2023-07-28 13:37:05 UTC
The issue was caused by introducing the $basearch variable in the repoid of the rhel9 repositories since the google-rhui-client-rhel9-4.1-1 client or earlier rpm.

We fixed this on our side by releasing a new leapp-rhui-google-1.0.0-2 in the following article: https://access.redhat.com/articles/6981918