Bug 1929342 - leapp fails when no repositories are enabled because `yum clean all` exits in 1
Summary: leapp fails when no repositories are enabled because `yum clean all` exits in 1
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: leapp-repository
Version: 7.9
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Leapp Notifications Bot
QA Contact: upgrades-and-conversions
URL:
Whiteboard:
Depends On:
Blocks: 1818077 1818088
TreeView+ depends on / blocked
 
Reported: 2021-02-16 17:24 UTC by jcastran
Modified: 2023-07-31 07:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OAMG-4477 0 None None None 2023-05-11 08:09:12 UTC
Red Hat Knowledge Base (Solution) 5233701 0 None None None 2021-02-16 17:36:51 UTC

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.


Note You need to log in before you can comment on or make changes to this bug.