Bug 1929342

Summary: leapp fails when no repositories are enabled because `yum clean all` exits in 1
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: low Docs Contact:
Priority: low    
Version: 7.9CC: fkrska, pstodulk
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
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:
Bug Depends On:    
Bug Blocks: 1818077, 1818088    

Description jcastran 2021-02-16 17:24:27 UTC
Description of problem:
When there are no repositories enabled, leapp fails with:

============================================================
                       ERRORS
============================================================


2021-02-16 00:55:42.235256 [ERROR] Actor: scan_subscription_manager_info
Message: Unable to use yum successfully
Summary:
    Details: Command ['yum', 'clean', 'all'] failed with exit code 1.
    Stderr: 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>


============================================================
                       END OF ERRORS
============================================================



Version-Release number of selected component (if applicable):
leapp-0.11.1-1.el7_9.noarch

How reproducible:
Everytime

Steps to Reproduce:
1. disable all repos
2. leapp preupgrade
3.

Actual results:
Message: Unable to use yum successfully
Summary:
    Details: Command ['yum', 'clean', 'all'] failed with exit code 1.
    Stderr: 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>


Expected results:
Leapp could enable all repos to clear cache
   # yum clean all --enablerepo=\*

Additional info:

Comment 3 Petr Stodulka 2021-10-05 08:53:12 UTC
I am not able to reproduce this issue with the current upstream solution. So possibly the problem is going to be fixed with the next release. We will try to reproduce the problem later with the original builds.