Bug 2218882

Summary: leapp should inform users that they must have the Source versions "base repos" enabled.
Product: Red Hat Enterprise Linux 7 Reporter: jcastran
Component: leapp-repositoryAssignee: Leapp Notifications Bot <leapp-notifications-bot>
Status: NEW --- QA Contact: upgrades-and-conversions
Severity: medium Docs Contact:
Priority: medium    
Version: 7.9CC: pstodulk
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: 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-06-30 12:15:33 UTC
Description of problem:
leapp upgrade fails when yum clean all, fails.

yum clean all fails if no repositories are enabled.

This command is run 1st with the Source repos, and then again with the Target version repos. If it fails, the error is the same 

**leapp-upgrade.log
External command has finished: ['subscription-manager', 'list', '--consumed']
External command has started: ['yum', 'clean', 'all']
Loaded plugins: product-id, ps, search-disabled-repos, subscription-manager
There are no enabled repos.
 Run yum repolist all to see the repos you have.
 To enable Red Hat Subscription Management repositories:
     subscription-manager repos --enable <repo>
 To enable custom repositories:
     yum-config-manager --enable <repo>
Command ['yum', 'clean', 'all'] failed with exit code 1.
External command has finished: ['yum', 'clean', 'all']

**leapp-report.txt
Risk Factor: high
Title: Unable to use yum successfully
Summary: {"details": "Command ['yum', 'clean', 'all'] failed with exit code 1.", "stderr": "There are no enabled repos.\n Run \"yum repolist all\" to see the repos you have.\n To enable Red Hat Subscription Management repositories:\n     subscription-manager repos --enable <repo>\n To enable custom repositories:\n     yum-config-manager --enable <repo>\n"}
Key: bc36ea705f351c536dd1272a4d085c2b26b5f429


~~~~~~~~~~~~~~~~

Can we change this so that if it fails on the first run, it better informs the customer, and engineers, that we're talking about either the Source or the Target repositories that aren't enabled?

"Yum clean all failed, ensure you have <Source base repos such as rhel-7-server-rpms> enabled"