Bug 697087
Summary: | yum repolist is not producing a list when one of the repo baseurl causes a forbidden 403 | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | John Sefler <jsefler> |
Component: | yum | Assignee: | James Antill <james.antill> |
Status: | CLOSED ERRATA | QA Contact: | Red Hat Satellite QA List <satqe-list> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 5.7 | CC: | bkearney, cduryee, ebenes, ksrot, pknirsch, spandey |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | yum-3.2.22-34.el5 | Doc Type: | Bug Fix |
Doc Text: |
Previously, when one of the repository baseurl addresses caused an HTTP error code to be issued, the "yum repolist" command failed to produce the list of available repositories. This bug has been fixed and the repository list is now properly returned even if an error occurs.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2011-07-21 11:24:05 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
John Sefler
2011-04-15 19:16:50 UTC
This is a difference in the way yum works between 5 and 6, our code isn't being touched during this. We need to look into it more to see if we can avoid it via our repo config. I agreed that this may be a difference in the way yum works between rhel5 (yum-3.2.22-33.el5) and rhel6 (yum-3.2.29-7.el6.noarch). Unfortunately it impacts our subscription-manager tests that were originally authored using rhel6. Is it possible that: 1. We could open a defect against RHEL5.7 to pull in a newer version of yum that does not exhibit this failure. (Maybe this has already has been done?) 2. We could run yum on rhel5 (as well as rhel6) with an option or configuration setting that ignores the 403 when running yum repolist. (Does this option/config exist?) Moving over to yum since we can't do anything about this (or shouldn't) from our plugin Additional Info.... Here are the contents of my repo file.... [root@jsefler-onprem-5server ~]# cat /etc/yum.repos.d/redhat.repo # # Red Hat Repositories # Managed by (rhsm) subscription-manager # [awesomeos-workstation-scalable-fs] name = awesomeos-workstation-scalable-fs baseurl = https://cdn.redhat.com/path/to/awesomeos-workstation-scalable-fs enabled = 1 gpgcheck = 1 gpgkey = https://cdn.redhat.com/path/to/awesomeos/gpg/ sslverify = 1 sslcacert = /etc/rhsm/ca/redhat-uep.pem sslclientkey = /etc/pki/entitlement/key.pem sslclientcert = /etc/pki/entitlement/8367634176913608279.pem metadata_expire = 3600 [awesomeos-modifier] name = awesomeos-modifier baseurl = http://example.com/awesomeos-modifier enabled = 1 gpgcheck = 1 gpgkey = http://example.com/awesomeos-modifier/gpg sslverify = 1 sslcacert = /etc/rhsm/ca/redhat-uep.pem sslclientkey = /etc/pki/entitlement/key.pem sslclientcert = /etc/pki/entitlement/834137930840854788.pem [awesomeos-server-scalable-fs] name = awesomeos-server-scalable-fs baseurl = https://cdn.redhat.com/path/to/awesomeos-server-scalable-fs enabled = 1 gpgcheck = 1 gpgkey = https://cdn.redhat.com/path/to/awesomeos/gpg/ sslverify = 1 sslcacert = /etc/rhsm/ca/redhat-uep.pem sslclientkey = /etc/pki/entitlement/key.pem sslclientcert = /etc/pki/entitlement/8367634176913608279.pem metadata_expire = 3600 [always-enabled-content] name = always-enabled-content baseurl = https://cdn.redhat.com/foo/path/always enabled = 1 gpgcheck = 1 gpgkey = https://cdn.redhat.com/foo/path/always/gpg sslverify = 1 sslcacert = /etc/rhsm/ca/redhat-uep.pem sslclientkey = /etc/pki/entitlement/key.pem sslclientcert = /etc/pki/entitlement/7590966368525320704.pem metadata_expire = 200 [content-label] name = content baseurl = https://cdn.redhat.com/foo/path enabled = 1 gpgcheck = 1 gpgkey = https://cdn.redhat.com/foo/path/gpg/ sslverify = 1 sslcacert = /etc/rhsm/ca/redhat-uep.pem sslclientkey = /etc/pki/entitlement/key.pem sslclientcert = /etc/pki/entitlement/7590966368525320704.pem metadata_expire = 0 [never-enabled-content] name = never-enabled-content baseurl = https://cdn.redhat.com/foo/path/never enabled = 0 gpgcheck = 1 gpgkey = https://cdn.redhat.com/foo/path/never/gpg sslverify = 1 sslcacert = /etc/rhsm/ca/redhat-uep.pem sslclientkey = /etc/pki/entitlement/key.pem sslclientcert = /etc/pki/entitlement/7590966368525320704.pem metadata_expire = 600 Here is what I get when running "yum repolist enabled" ... [root@jsefler-onprem-5server ~]# yum repolist enabled Loaded plugins: product-id, rhnplugin, security, subscription-manager Updating Red Hat repositories. This system is not registered with RHN. RHN Satellite or RHN Classic support will be disabled. https://cdn.redhat.com/foo/path/always/repodata/repomd.xml: [Errno 14] HTTP Error 403: Forbidden Trying other mirror. Error: Cannot retrieve repository metadata (repomd.xml) for repository: always-enabled-content. Please verify its path and try again [root@jsefler-onprem-5server ~]# ^^^ Note the output from yum repolist seems to get blocked on the first 403 and the output does not produce a any list of enabled repos. On the otherhand, rhel 6 does produce a list of enabled repos depite the 403 error. I'd like to see the same behavior in rhel5.7 as I see in rhel6. Ok, so if I apply the following, then it should do what you want ... and the only conflicts I get are in docs/yum.8 It's still quite a bit for RHEL-5, but I'm ok with it (it should all be confined to repolist command): commit fd1632c733c47719fb7e69d7e2a9d18f7c05b0ad Author: James Antill <james> Date: Tue Aug 11 13:33:27 2009 -0400 Add expire data to repolist -v commit 7eaae631092cdd2d09ece8b87b648ca316c909fe Author: James Antill <james> Date: Tue Aug 11 17:01:07 2009 -0400 Cleanup whitespace for repolist -v commit 2ffe59eb3e441f3fce3038d1c19079cc5c59eb74 Author: James Antill <james> Date: Mon Sep 21 02:05:29 2009 -0400 Catch and ignore any repo. errors, and allow cache only (BZ 524454) commit 1934f8832dc22802913ce79eb45724f10d44edc8 Author: Ville-Pekka Vainio <vpivaini.fi> Date: Mon Nov 16 20:38:50 2009 +0200 Fix UnicodeDecodeErrors in yumcommands.py Fix two UnicodeDecodeErrors which were raised when running 'yum -v repolist' in fi_FI.utf8 with the yet uncommitted Finnish translation. commit 4aa1a6639a1544bc714b75b61d5cbf9d5ce34fc3 Author: James Antill <james> Date: Tue Dec 1 10:06:09 2009 -0500 Make status output nicer for repolist disabled/all/enabled, BZ 540489 commit ac8eed8587a347dddf827efd1c0d7ab8674b2a79 Author: James Antill <james> Date: Sat Jan 16 12:42:51 2010 -0500 A few minor tweaks to repolist output: [...] commit 7f9d8c86ed44f3826288c86bf74e9366b22ac532 Author: James Antill <james> Date: Mon Jan 18 08:42:14 2010 -0500 Fix the repolist cacheonly feature, document it Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Previously, when one of the repository baseurl addresses caused an HTTP error code to be issued, the "yum repolist" command failed to produce the list of available repositories. This bug has been fixed and the repository list is now properly returned even if an error occurs. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-1060.html |