Bug 703169

Summary: yum-rhn-plugin: yum does not clean all the metadata
Product: [Community] Spacewalk Reporter: Šimon Lukašík <slukasik>
Component: ClientsAssignee: Šimon Lukašík <slukasik>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.5CC: jhutar, msuchy
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-21 14:43:45 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:
Bug Depends On:    
Bug Blocks: 695242    

Description Šimon Lukašík 2011-05-09 14:23:22 UTC
Description of problem:
yum clean all does not remove channel metadata created by yum-rhn-plugin.

Consequently, user not able to acquire fresh repodata from the Spacewalk
server by 'yum clean all && yum repolist' command.

Version-Release number of selected component (if applicable):
Spacewalk client 1.5 on RHEL6


How reproducible:
deterministic

Steps to Reproduce:
1. cd /var/cache/yum/x86_64
2. find ./ -name repomd.xml  | wc -l
   22
3. yum clean all
4. find ./ -name repomd.xml  | wc -l
   7


Actual results:
The repodata cache is not deleted.

Expected results:
The repodata cache is deleted. At least for channels, which are
associated to the system in a time of 'yum clean all'


Additional info:
In addition, It would be nice to remove all the metadata,
e.g. when a system gets unsubscribed from a channel, yum-rhn-plugin
should remove the metadata.

Note here, that yum-rhn-plugin has a potential to check for unsubscribed
channels, because he stores them in rhnpllugin.repos file.

Comment 1 Šimon Lukašík 2011-05-09 14:24:20 UTC
Affected packages:
yum-rhn-plugin-1.5.6-1.el6.noarch
yum-3.2.29-17.el6.noarch
yum-metadata-parser-1.1.2-16.el6.x86_64

Comment 3 Šimon Lukašík 2011-07-18 11:05:52 UTC
Taking.

Comment 4 Šimon Lukašík 2011-07-18 11:41:59 UTC
The problem is that yum-rhn-plugin during init_hook() searches
for a repomd.xml file in

  ${cache_dir}/channel/repodata/

path. While Yum stores that file in

  ${cache_dir}/channel/

path. As a result the init_hook() does not forward such channel to Yum,
when the 'yum clean all' command is run. This behavior was introduced
by fix for the bug 688870.

The correct path where the repomd.xml is stored by Yum is not accessible
from a plug-in. It's set in YumRepo.YumRepository._commonLoadRepoXML()

Comment 5 Šimon Lukašík 2011-07-18 11:54:00 UTC
spacewalk.git 731bde5f9d0506300e7722294258a8d3b0e689ba

Comment 6 Jan Pazdziora (Red Hat) 2011-07-19 19:36:51 UTC
This bugzilla is currently MODIFIED, so we believe the fix is in the Spacewalk nightly yum repository at http://spacewalk.redhat.com/yum/nightly/

Therefore, moving ON_QA.

Comment 7 Jan Pazdziora (Red Hat) 2011-07-21 14:43:45 UTC
Spacewalk 1.5 was released.