RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 769864 - 'yum makecache' exits on unreachable repo with 'skip_if_unavailabe=1' set
Summary: 'yum makecache' exits on unreachable repo with 'skip_if_unavailabe=1' set
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum
Version: 6.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: alpha
: 6.3
Assignee: James Antill
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks: 845581
TreeView+ depends on / blocked
 
Reported: 2011-12-22 15:14 UTC by David Jaša
Modified: 2014-01-21 06:24 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 819537 828658 845581 (view as bug list)
Environment:
Last Closed: 2012-06-20 13:53:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0857 0 normal SHIPPED_LIVE yum bug fix and enhancement update 2012-06-19 20:48:27 UTC

Description David Jaša 2011-12-22 15:14:10 UTC
Description of problem:
SSIA. 'yum update' does not have this problem, unreachable repos with skip_if_unavailable=1 are skipped

Version-Release number of selected component (if applicable):
yum-3.2.29-22.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. set up a repo:
[test]
name=test
baseurl=<url that is valid but returns 404>
enabled=1
skip_if_unavailable=1
2. run yum --disablerepo='*' --enablerepo test makecache
3.
  
Actual results:
yum exits complaining that it can not download info for test repo:
$BASEURL: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: test. Please verify its path and try again

Expected results:
yum skips repo

Additional info:

Comment 1 Zdeněk Pavlas 2012-01-12 12:19:39 UTC
> Expected results: yum skips repo

You have enabled only one repo, and Yum did skip that.  'skip_if_unavailable=1' does not prevent Yum from printing error messages (that's intended).

Could you try '--enablerepo test --enablerepo other' too?  This works upstream, but I don't have RHEL6 at hands.  Thanks!

Comment 2 David Jaša 2012-01-12 12:35:40 UTC
(In reply to comment #1)
> > Expected results: yum skips repo
> 
> You have enabled only one repo, and Yum did skip that.  'skip_if_unavailable=1'
> does not prevent Yum from printing error messages (that's intended).
> 

This exactly does not work in RHEL:

# yum makecache ; echo $?
Loaded plugins: auto-update-debuginfo, refresh-packagekit, rhnplugin
[other repo metadata fetched]     
<repo_URL>: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: <repo>. Please verify its path and try again
1

yum should ignore the error and keep going through the rest of the repos, it exits with 1 instead.

Comment 6 Karel Srot 2012-04-03 12:02:35 UTC
The bug is not fixed in yum-3.2.29-27.el6.noarch

# yum --disablerepo='*' --enablerepo=bz769864repo\* makecache
Loaded plugins: downloadonly, local, presto, product-id, refresh-packagekit, rhnplugin, security,
              : subscription-manager
Updating certificate-based repositories.
This system is not registered with RHN.
RHN Satellite or RHN Classic support will be disabled.
http://redhat.com/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: bz769864repoA. Please verify its path and try again
#


yum crashes already at

    def doCommand(self, base, basecmd, extcmds):
            ...
            ...
            for repo in base.repos.listEnabled():
>>HERE<<        repo.repoXML

from /usr/share/yum-cli/yumcommands.py.

Comment 9 Karel Srot 2012-04-10 07:56:18 UTC
yum-3.2.29-28.el6.noarch

:: [   FAIL   ] :: Running 'yum --disablerepo='*' --enablerepo=bz769864repo\* makecache' (Expected 1, got 0)
Loaded plugins: downloadonly, presto, product-id, refresh-packagekit, rhnplugin,
              : security, subscription-manager
Updating certificate-based repositories.
This system is not registered with RHN.
RHN Satellite or RHN Classic support will be disabled.
http://redhat.com/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Trying other mirror.
Metadata Cache Created
http://redhat.com/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"

Just want to make sure whether it is OK for yum makecache to exit with 0 when the skip_if_unavailable repo is not available. From my point of view it is fine since the repo is expected to be unavailable sometimes, therefore I don't see a reason why yum should fail. Please confirm.

Comment 11 James Antill 2012-04-16 15:48:37 UTC
Yeh, seems fine  to me ... you told it to skip on errors, and it skipped. Success.

Comment 13 errata-xmlrpc 2012-06-20 13:53:50 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-2012-0857.html


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