Bug 744775 - Yum preference of newer repomd.xml causes rhn scenario to fail
Summary: Yum preference of newer repomd.xml causes rhn scenario to fail
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rhn-client-tools
Version: 6.2
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: rc
: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: 744776
TreeView+ depends on / blocked
 
Reported: 2011-10-10 12:43 UTC by Šimon Lukašík
Modified: 2014-11-04 11:42 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 744776 (view as bug list)
Environment:
Last Closed: 2014-11-04 11:42:56 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Šimon Lukašík 2011-10-10 12:43:03 UTC
Description of problem:
When Yum downloads a repomd.xml which is older than one currently
in cache, Yum will ignore such downloaded repomd.xml. Unfortunately,
this behaviour causes problems for repositories from a different
source which has only the name in common.

For instance, when you have 2 RHN Satellite instances. (One prod,
with kinda older content and another one staging, with latest greatest).
And You decide to re-register a client machine from staging to prod
yum operations will fail, because of incorrect repomd.xml

This behaviour is regression against older RHELs.

The rhn registration should invalidate local Yum cache for channels,
which were added during the registration.

Version-Release number of selected component (if applicable):
yum-3.2.29-17.el6.noarch
rhn-setup-1.0.0-61.el6.noarch

How reproducible:
deterministic

Steps to Reproduce:
1. have 2 RHN Satellite instances
    - one with fresh rhel base channel synced
    - another with older rhel base channel content
2. register client machine to RHNS with newer channel content
3. # yum repolist
4. register client machine to RHNS with older channel content
5. # yum update
  
Actual results:
(4.)
# rhnreg_ks --username admin --password blabla --force
Not using downloaded repomd.xml because it is older than what we have:
  Current   : Mon Oct  3 12:14:44 2011
  Downloaded: Tue Jul 19 23:15:39 2011
(5.) # yum update
(...)
Error: failed to retrieve repodata/c1543a4026b030e016e786bd4808a5b75fa88609-filelists.xml.gz from rhel-x86_64-server-6
error was [Errno 14] HTTP Error 404: Not Found
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest


Expected results:
registration should not print the warning
yum update should work without need of `yum clean'

Additional info:
The output of rhnreg_ks is emitted by Yum. Namely by:

    yum.yumRepo.YumRepository._groupCheckDataMDNewer()

Comment 1 Jan Pazdziora 2011-11-24 13:44:14 UTC
The scenario described seems rare enough. On top of that, invalidating cache might not be what users expect in other (bandwidth-saving) scenarios.

As a workaround, I believe

   yum clean all

after re-registration should help.

I'm going to devel nack this bugzilla. If we have customer cases hitting the problem, we can revisit.

Comment 2 RHEL Program Management 2011-11-24 13:55:11 UTC
Development Management has reviewed and declined this request.  You may appeal
this decision by reopening this request.

Comment 3 Šimon Lukašík 2011-11-24 20:34:48 UTC
(In reply to comment #1)
> The scenario described seems rare enough. On top of that, invalidating cache
> might not be what users expect in other (bandwidth-saving) scenarios.
> 
Could you please elaborate more about these bandwidth-saving scenarios?

I also wonder, if you can find a use for the old repodata after re-registering
with different satellite/hosted.

Comment 4 Jan Pazdziora 2011-11-25 07:56:17 UTC
Bandwidth-saving -- if you switch to different Satellite or Proxy, you might *not* want to re-download new metadata.

On the other Satellite, the *content* of the metadata might be the same, even if the timestamp of the metadata would be different. Think about master Satellite and slave ISS Satellite. The ISS slave Satellite might have exactly the same packages as the master, with newer repodata. If you switch from the slave to the master, the content which is available to you might be exactly the same, in spite of the timestamp differences.

Comment 8 RHEL Program Management 2013-10-14 05:12:15 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.


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