Bug 688870 - yum fails when rhnplugin.repos contain name of channel that is not present
Summary: yum fails when rhnplugin.repos contain name of channel that is not present
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum-rhn-plugin
Version: 6.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Michael Mráka
QA Contact: Martin Minar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-18 10:44 UTC by Martin Minar
Modified: 2016-07-04 00:56 UTC (History)
5 users (show)

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.
Clone Of:
Environment:
Last Closed: 2011-05-19 13:06:23 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0565 0 normal SHIPPED_LIVE rhn-client-tools and yum-rhn-plugin bug fix and ehnancement update 2011-05-18 17:57:10 UTC

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


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