Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 688870

Summary: yum fails when rhnplugin.repos contain name of channel that is not present
Product: Red Hat Enterprise Linux 6 Reporter: Martin Minar <mminar>
Component: yum-rhn-pluginAssignee: Michael Mráka <mmraka>
Status: CLOSED ERRATA QA Contact: Martin Minar <mminar>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0CC: jhutar, jpazdziora, mkoci, mmraka, msuchy
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: yum-rhn-plugin-0.9.1-23 Doc Type: Bug Fix
Doc Text:
yum-rhn-plugin caches list of channels (repos) which are available on spacewalk server. It (mis)reported error when cache has been purged.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 13:06:23 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 Martin Minar 2011-03-18 10:44:48 UTC
Description of problem:
yum fails when /var/cache/yum/rhnplugin.repos contain name of channel that is not present in cache structure (eg. there is no repo.xml) in /var/cache/yum/<channel_name>

Version-Release number of selected component (if applicable):
yum-rhn-plugin-1.4.4-1.el5 (on machine with Spacewalk)

How reproducible:
Alway

Steps to Reproduce:
1. Register into Satellite and channel
2. Manually remove SystemID and repository data
3. Try yum repolist
  
Actual results:
]# yum repolist
Loaded plugins: rhnplugin
This system is not registered with RHN.
RHN Satellite or RHN Classic support will be disabled.
file://var/cache/yum/test-i386-0/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: '/cache/yum/test-i386-0/repodata/repomd.xml'
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: test-i386-0. Please verify its path and try again

Expected results:
Cache problems should not stop yum operation from finishing.

Additional info:
It is general problem - yum install will return same error.

Workaround is deleting of /var/cache/yum/rhnplugin.repos file.

Comment 2 Michael Mráka 2011-03-24 09:30:14 UTC
Fixed in spacewalk nightly
commit 44955186189e3a60afa07e6e4d1b5c9710b2e61c
    688870 - also check whether cached repo is valid

Comment 5 Miroslav Suchý 2011-04-01 20:23:20 UTC
I think that https://bugzilla.redhat.com/show_bug.cgi?id=690234#c5 can solve #4 as side effect. Have to test it...

Comment 6 Miroslav Suchý 2011-04-01 20:27:56 UTC
Hmm.. No it will to solve this BZ. :(

Comment 8 Michael Mráka 2011-04-04 12:12:14 UTC
Backported to CLIENT-RHEL-6 as
commit 8c882f84ce28711c3b387153e3a727b78872f407
    688870 - resolve --enablerepo/--disablerepo for RHN repos
    (cherry picked from commit 1147d9d704d797483e0f30f086125468d91b9f1a)

Comment 12 errata-xmlrpc 2011-05-19 13:06:23 UTC
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-0565.html