Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2186874

Summary: Leapp fails on satellite clients when RHEL 8 repos are disabled (overridden)
Product: Red Hat Enterprise Linux 7 Reporter: jcastran
Component: leapp-repositoryAssignee: Leapp team <leapp-notifications>
Status: CLOSED DUPLICATE QA Contact: Upgrades and Supportability <upgrades-and-supportability>
Severity: low Docs Contact:
Priority: low    
Version: 7.9CC: mportman, pstodulk
Target Milestone: rcFlags: pm-rhel: mirror+
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-05-05 09:51:53 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 jcastran 2023-04-14 18:00:34 UTC
Description of problem:

Version-Release number of selected component (if applicable):
leapp-upgrade-el7toel8-0.17.0-10.el7_9.noarch
leapp-deps-0.15.0-2.el7_9.noarch
leapp-upgrade-el7toel8-deps-0.17.0-10.el7_9.noarch
leapp-0.15.0-2.el7_9.noarch
python2-leapp-0.15.0-2.el7_9.noarch


How reproducible:
Everytime

Steps to Reproduce:
1. Satellite web ui > Hosts > content hosts > (system) > Repository sets
2. Set AppStream and BaseOS to disabled (overridden)
3.

Actual results:
Leapp fails on the second "yum clean all" because all RHEL 8 repos are disabled.

2023-04-13 11:17:51.78  DEBUG    PID: 23551 leapp.workflow.TargetTransactionFactsCollection.target_userspace_creator: Host and machine ids are equal (6eab89b2bfdf445ab78f282a14abd822): refusing to link journals
2023-04-13 11:17:51.94  DEBUG    PID: 23551 leapp.workflow.TargetTransactionFactsCollection.target_userspace_creator: External command has finished: ['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=LEA
PP_IPU_IN_PROGRESS=7to8', '--setenv=LEAPP_UNSUPPORTED=0', '--setenv=LEAPP_EXECUTION_ID=45ea2ab8-e4ed-48d2-80b1-2774a24710e6', '--setenv=LEAPP_HOSTNAME=lnwkdev70v.pseg.com', 'ln', '-s', '/etc/rhsm', '/etc/rhsm-hos
t']
2023-04-13 11:17:51.96  DEBUG    PID: 23551 leapp.workflow.TargetTransactionFactsCollection.target_userspace_creator: External command has started: ['systemd-nspawn', '--register=no', '--quiet', '-D', '/var/lib/l
eapp/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=L
EAPP_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=LEAP
P_IPU_IN_PROGRESS=7to8', '--setenv=LEAPP_UNSUPPORTED=0', '--setenv=LEAPP_EXECUTION_ID=45ea2ab8-e4ed-48d2-80b1-2774a24710e6', '--setenv=LEAPP_HOSTNAME=lnwkdev70v.pseg.com', 'yum', 'clean', 'all']
2023-04-13 11:17:51.106 DEBUG    PID: 23551 leapp.workflow.TargetTransactionFactsCollection.target_userspace_creator: Failed to create directory /var/lib/leapp/scratch/mounts/root_/system_overlay//sys/fs/selinux:
 Read-only file system
2023-04-13 11:17:51.108 DEBUG    PID: 23551 leapp.workflow.TargetTransactionFactsCollection.target_userspace_creator: Failed to create directory /var/lib/leapp/scratch/mounts/root_/system_overlay//sys/fs/selinux:
 Read-only file system
2023-04-13 11:17:51.109 DEBUG    PID: 23551 leapp.workflow.TargetTransactionFactsCollection.target_userspace_creator: Host and machine ids are equal (6eab89b2bfdf445ab78f282a14abd822): refusing to link journals
2023-04-13 11:17:51.363 DEBUG    PID: 23551 leapp.workflow.TargetTransactionFactsCollection.target_userspace_creator: Loaded plugins: enabled_repos_upload, langpacks, package_upload, product-id,
2023-04-13 11:17:51.365 DEBUG    PID: 23551 leapp.workflow.TargetTransactionFactsCollection.target_userspace_creator:               : search-disabled-repos, subscription-manager
2023-04-13 11:17:51.471 DEBUG    PID: 23551 leapp.workflow.TargetTransactionFactsCollection.target_userspace_creator:
2023-04-13 11:17:51.477 DEBUG    PID: 23551 leapp.workflow.TargetTransactionFactsCollection.target_userspace_creator: This system is not receiving updates. You can use subscription-manager on the host to register
 and assign subscriptions.
2023-04-13 11:17:51.478 DEBUG    PID: 23551 leapp.workflow.TargetTransactionFactsCollection.target_userspace_creator:
2023-04-13 11:17:51.486 DEBUG    PID: 23551 leapp.workflow.TargetTransactionFactsCollection.target_userspace_creator: There are no enabled repos.
2023-04-13 11:17:51.487 DEBUG    PID: 23551 leapp.workflow.TargetTransactionFactsCollection.target_userspace_creator:  Run "yum repolist all" to see the repos you have.
2023-04-13 11:17:51.488 DEBUG    PID: 23551 leapp.workflow.TargetTransactionFactsCollection.target_userspace_creator:  To enable Red Hat Subscription Management repositories:
2023-04-13 11:17:51.489 DEBUG    PID: 23551 leapp.workflow.TargetTransactionFactsCollection.target_userspace_creator: Uploading Enabled Repositories Report
2023-04-13 11:17:51.490 DEBUG    PID: 23551 leapp.workflow.TargetTransactionFactsCollection.target_userspace_creator:      subscription-manager repos --enable <repo>
2023-04-13 11:17:51.491 DEBUG    PID: 23551 leapp.workflow.TargetTransactionFactsCollection.target_userspace_creator:  To enable custom repositories:
2023-04-13 11:17:51.492 DEBUG    PID: 23551 leapp.workflow.TargetTransactionFactsCollection.target_userspace_creator:      yum-config-manager --enable <repo>
2023-04-13 11:17:52.190 DEBUG    PID: 23551 leapp.workflow.TargetTransactionFactsCollection.target_userspace_creator: Command ['systemd-nspawn', '--register=no', '--quiet', '-D', '/var/lib/leapp/scratch/mounts/ro
ot_/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=:/et
c/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=45ea2ab8-e4ed-48d2-80b1-2774a24710e6', '--setenv=LEAPP_HOSTNAME=lnwkdev70v.pseg.com', 'yum', 'clean', 'all'] failed with exit code 1.
2023-04-13 11:17:52.193 DEBUG    PID: 23551 leapp.workflow.TargetTransactionFactsCollection.target_userspace_creator: External command has finished: ['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=LEA
PP_IPU_IN_PROGRESS=7to8', '--setenv=LEAPP_UNSUPPORTED=0', '--setenv=LEAPP_EXECUTION_ID=45ea2ab8-e4ed-48d2-80b1-2774a24710e6', '--setenv=LEAPP_HOSTNAME=lnwkdev70v.pseg.com', 'yum', 'clean', 'all']

Expected results:
Leapp should either enable these, or present a clear error with remediation steps.

Additional info:
This can be found in /var/lib/rhsm/cache/content_overrides.json

The below example is a RHEL 7 Satellite client with AppStream and BaseOS disabled that failed to leapp upgrade.

# jq '.[] | { contentLabel: .contentLabel, value: .value }' var/lib/rhsm/cache/content_overrides.json | grep \"0\" -B1
  "contentLabel": "rhel-5-server-rpms",
  "value": "0"
--
  "contentLabel": "rhel-6-server-rpms",
  "value": "0"
--
  "contentLabel": "rhel-8-for-x86_64-appstream-rpms",
  "value": "0"
--
  "contentLabel": "rhel-8-for-x86_64-baseos-rpms",
  "value": "0"

Comment 3 Petr Stodulka 2023-04-17 09:12:14 UTC
Hi John. Thank you for the report. I am setting the severity & priority to low as making the repositories enabled is documented as a required prerequisite in the official documentation:
* https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/upgrading_from_rhel_7_to_rhel_8/index#proc_preparing-a-satellite-system-for-the-upgrade_upgrading-from-rhel-7-to-rhel-8

Also by default users will not hit this as BaseOS & Appstream repositories are enabled in a content view by default when added, so users need to do an extra step to actually hit this problem.

Comment 4 Petr Stodulka 2023-04-17 10:55:02 UTC
But I expect to cover this better in the next update of documentation in the meanwhile.

Comment 10 Petr Stodulka 2023-05-05 09:51:53 UTC
The issue will be tracked in bug 1940869.

*** This bug has been marked as a duplicate of bug 1940869 ***