Bug 1195745

Summary: Yum refers to yum-config-manager which is not installed
Product: Red Hat Enterprise Linux 7 Reporter: Stephen Wadeley <swadeley>
Component: yumAssignee: Valentina Mukhamedzhanova <vmukhame>
Status: CLOSED ERRATA QA Contact: Eva Mrakova <emrakova>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: emrakova, itmodelfont82, james.antill, jscalf
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: yum-3.4.3-139.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 05:28:36 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 Stephen Wadeley 2015-02-24 13:40:18 UTC
Description of problem:

If you encounter a problem with a repo, subscription-manager suggests disabling the repo using yum-config-manager which is not installed by default on a RHEL7.0 server and cannot be installed without disabling the problem repo.


Version-Release number of selected component (if applicable):
[root@localhost ~]# rpm -q subscription-manager
subscription-manager-1.13.19-1.el7.x86_64
[root@localhost ~]# uname -a
Linux localhost.localdomain 3.10.0-123.el7.x86_64 #1 SMP Mon May 5 11:16:57 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]#

How reproducible:


Steps to Reproduce:
1. Simulate broken repo

2. yum update
Loaded plugins: product-id, subscription-manager
https://cdn.redhat.com/content/eus/rhel/server/7/7Server/x86_64/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.

 One of the configured repositories failed (Red Hat Enterprise Linux 7 Server - Extended Update Support (RPMs)),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Disable the repository, so yum won't use it by default. Yum will then
        just ignore the repository until you permanently enable it again or use
        --enablerepo for temporary usage:

            yum-config-manager --disable rhel-7-server-eus-rpms

     4. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=rhel-7-server-eus-rpms.skip_if_unavailable=true

failure: repodata/repomd.xml from rhel-7-server-eus-rpms: [Errno 256] No more mirrors to try.
https://cdn.redhat.com/content/eus/rhel/server/7/7Server/x86_64/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found



Actual results:

we are told to:
 yum-config-manager --disable rhel-7-server-eus-rpms

but that is not installed by default on a RHEL7.0 server

Expected results:
suggest use something known to be installed:
subscription-manager repos --disable=rhel-7-server-eus-rpms


Additional info:

Comment 1 John Sefler 2015-02-24 17:25:53 UTC
The offending message is coming from yum...

[root@jsefler-os7 ~]# grep -r "One of the configured" /usr/share/
Binary file /usr/share/yum-cli/yummain.pyc matches
/usr/share/yum-cli/yummain.py: One of the configured repositories failed (%(repo)s),
[root@jsefler-os7 ~]# rpm -q --whatprovides /usr/share/yum-cli/yummain.py
yum-3.4.3-125.el7.noarch
[root@jsefler-os7 ~]#

Comment 2 Stephen Wadeley 2015-02-24 19:59:43 UTC
Thank you John, sorry for my mistake. I will rename the bug.

Comment 3 Jennifer Scalf 2015-08-22 19:46:07 UTC
I also ran into this when I installed a minimal install of RHEL 7.1. Knowing about subscription-manager, the workaround is simple (subscription-manager repos --disable=), but it would be nice to see this fixed for others who use the commands they see posted in the error/warning messages from yum.

Comment 4 Karel Srot 2015-12-15 16:47:52 UTC
Seems to be very similar to bug 1175309.

Comment 5 Valentina Mukhamedzhanova 2016-02-17 14:36:31 UTC
We can improve the message by adding the instruction to run yum with --disablerepo, to have the repo disabled temporarily. That would work for any repo, and wouldn't require any additional packages.

Comment 6 Karel Srot 2016-03-01 07:49:40 UTC
Hi Valentina,

I would propose to do both, i.e. to provide instructions to temporary disable the repo and also adding the subscription-manager hint (while preserving the yum-config-manager one). Something like:

...
     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Disable the repository temporarily

            yum --disablerepo=rhel-7-server-eus-rpms ...

     4. Disable the repository PERMANENTLY, so yum won't use it by default. Yum will then
        just ignore the repository until you permanently enable it again or use
        --enablerepo for temporary usage:

            yum-config-manager --disable rhel-7-server-eus-rpms
        or
            subscription-manager repos --disable=rhel-7-server-eus-rpms

     5. Configure the failing repository to be skipped, if it is unavailable.
....


What do you think?

Comment 8 Valentina Mukhamedzhanova 2016-03-07 12:20:38 UTC
Yes, we can do this.

Comment 11 Eva Mrakova 2016-07-21 07:54:47 UTC
needinfo cleared

Comment 13 errata-xmlrpc 2016-11-04 05:28:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2397.html