Bug 967121

Summary: 'yum remove' exits on unreachable repo with 'skip_if_unavailabe=1' set
Product: Red Hat Enterprise Linux 6 Reporter: Karel Srot <ksrot>
Component: yumAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED ERRATA QA Contact: Karel Srot <ksrot>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.4CC: james.antill, jgreenleaf, jzeleny, ksrot, tcallawa, vmukhame
Target Milestone: beta   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: yum-3.2.29-54.el6 Doc Type: Bug Fix
Doc Text:
Cause: have an unavailable repo with 'skip_if_unavailabe=1' and run 'yum remove' Consequence: yum sees an unavailable repo and exits Fix: patch Result: the unavailable repo with 'skip_if_unavailabe=1' is skipped and 'yum remove' works as expected
Story Points: ---
Clone Of: 842031 Environment:
Last Closed: 2014-10-14 04:36:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Karel Srot 2013-05-24 19:34:29 UTC
encountered on RHEL-6.4 with yum-3.2.29-40.el6

+++ This bug was initially created as a clone of Bug #842031 +++

yum install xxx with one bad repository  with skip_if_unavailable=1 aborts entirely instead of just skipping that bad repository.

Note in my case there is no 404, but:


[paul@bofh vala]$ sudo yum install vala
Loaded plugins: auto-update-debuginfo, langpacks, refresh-packagekit
http://download.lab.bos.redhat.com/devel/dmach/repos/XXXXXXX/fedora/17/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Couldn't resolve host"
Trying other mirror.
Error: failure: repodata/repomd.xml from XXXXXXX-fedora: [Errno 256] No more mirrors to try.

because my VPN is down, it is not be able to resolve the internal only dns entry, so it should ignore this repository.

Comment 1 Zdeněk Pavlas 2013-05-28 06:38:54 UTC
I thought this was fixed already.. Does it fail with --noplugins, too?  The skip_if_unavailable is in effect when requesting "primary" or "all" metadata only.

It might be the langpack plugin, asking for "comps"..

Comment 2 Jim 2013-07-25 19:15:16 UTC
I can confirm that this bug is still in effect with the "--noplugins" flag.

Comment 3 Jim 2013-07-25 19:16:18 UTC
But only for certain yum commands. "yum install" works, but "yum remove" does not.

Comment 4 Zdeněk Pavlas 2013-07-29 08:24:34 UTC
That's possible, "yum remove" does not set up repos unless dependencies need to be resolved.. but most "simple" package removals work, I assume?  Seems to be fixed upstream already (complex removals work, skipping unreachable repositories).  Do you have a "yum remove" reproducer?

Comment 5 Jim 2013-11-25 17:31:52 UTC
This is still an issue in the newest version of rhel (6.4), with trivial removals:

# package-cleanup --leaves
Loaded plugins: fastestmirror
NetworkManager-glib-0.8.1-43.el6.x86_64
libarchive-2.8.3-4.el6_2.x86_64
libertas-usb8388-firmware-5.110.22.p23-3.1.el6.noarch
libstdc++-4.4.7-3.el6.i686

# yum remove NetworkManager-glib --noplugins
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package NetworkManager-glib.x86_64 1:0.8.1-43.el6 will be erased
--> Finished Dependency Resolution
<stripped> : [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: <stripped> . Please verify its path and try again
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodiges


All of my repos have "skip_if_unavailable=1"

Comment 6 Valentina Mukhamedzhanova 2014-04-08 14:37:01 UTC
I can't reproduce it on 6.5, could you please provide a reproducer?


# yum install vala
Loaded plugins: product-id, rhnplugin, security, subscription-manager, verify
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
This system is receiving updates from RHN Classic or RHN Satellite.
http://internal/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'internal'"
Trying other mirror.
repo-01022604                                                                    | 1.9 kB     00:00 ... 
repo-01022604/primary                                                            |  205 B     00:00 ... 
rhel-x86_64-server-6                                                             | 1.8 kB     00:00     
rhel-x86_64-server-6/primary                                                     |  17 MB     00:14

Comment 7 Karel Srot 2014-04-09 12:53:17 UTC
(In reply to Valentina Mukhamedzhanova from comment #6)
> I can't reproduce it on 6.5, could you please provide a reproducer?

# cat /etc/yum.repos.d/test.repo 
[test]
name=test
baseurl=http://myserver.cooldomain.org/repo
skip_if_unavailable=1
enabled=1
gpgcheck=0

# yum -y install aide
# yum clean all
# yum remove aide --noplugins

Comment 16 errata-xmlrpc 2014-10-14 04:36:28 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.

http://rhn.redhat.com/errata/RHBA-2014-1410.html