Bug 523673 - Cannot retrieve repository metadata (repomd.xml) for repository: rhel-x86_64-server-5.3.z
Summary: Cannot retrieve repository metadata (repomd.xml) for repository: rhel-x86_64-...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: 530
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Šimon Lukašík
URL:
Whiteboard:
Depends On:
Blocks: sat531-triage
TreeView+ depends on / blocked
 
Reported: 2009-09-16 12:36 UTC by Miroslav Suchý
Modified: 2018-11-14 20:29 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-18 08:28:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2010:0897 0 normal SHIPPED_LIVE Red Hat Network Satellite bug fix update 2010-11-18 08:27:31 UTC

Description Miroslav Suchý 2009-09-16 12:36:03 UTC
Description of problem:
We have on sputnik-prod all z-stream channels. But after upgrade from sat520 to sat530 we get:
 Error: Cannot retrieve repository metadata (repomd.xml) for repository: rhel-x86_64-server-5.3.z. Please verify its path and try again

Channels details say:
Last Repo Build:  	 (none)
Repo Cache Status: 	(none)
For all z-stream channel. It is not specific to 5.3.z.

Even if I manualy put such channel to queue using:
INSERT
  INTO rhnRepoRegenQueue
        (id, channel_label, client, reason, force, bypass_filters, next_action, created, modified)
  VALUES (rhn_repo_regen_queue_id_seq.nextval, 'rhel-x86_64-server-5.3.z' , 'msuchy-by-hand', NULL, 'N', 'N', sysdate, sysdate, sysdate);
It is after few moments deleted from table, but repomd cache is not created and status is not changed.

Version-Release number of selected component (if applicable):
sat530

How reproducible:
once

Steps to Reproduce:
1. have sat520, sync z-stream channel
2. upgrade to sat530
3. register to z-stream channel
4. do yum upgrade
  
Actual results:
Cannot retrieve repository metadata (repomd.xml) for repository: rhel-x86_64-server-5.3.z

Expected results:
yum upgrade works

Comment 1 Miroslav Suchý 2009-09-16 15:23:30 UTC
Note if I do:
INSERT
  INTO rhnRepoRegenQueue
        (id, channel_label, client, reason, force, bypass_filters, next_action, created, modified)
VALUES (rhn_repo_regen_queue_id_seq.nextval,
'rhel-x86_64-server-5.0.z' , 'msuchy-by-hand', NULL, 'Y', 'Y', sysdate, sysdate, sysdate)

the repomd is generated and I can use it in yum. But the status on webUI is still (none).

Comment 2 Miroslav Suchý 2009-09-17 10:38:01 UTC
Little update
This will not force create of repomd.
INSERT
  INTO rhnRepoRegenQueue
        (id, channel_label, client, reason, force, bypass_filters, next_action,
created, modified)                                                             
  VALUES (rhn_repo_regen_queue_id_seq.nextval, 'rhel-x86_64-server-5.1.z' ,    
  6  'msuchy-by-hand', NULL, 'Y', 'N', sysdate, sysdate, sysdate);   


But this will do:
INSERT
  INTO rhnRepoRegenQueue
        (id, channel_label, client, reason, force, bypass_filters, next_action,
created, modified)                                                             
  VALUES (rhn_repo_regen_queue_id_seq.nextval, 'rhel-x86_64-server-5.1.z' ,    
  6  'msuchy-by-hand', NULL, 'Y', 'Y', sysdate, sysdate, sysdate);   

So it seems, something is broken in 
 channelToProcess.isChannelRepodataRequired()

Comment 3 Miroslav Suchý 2009-09-17 11:17:00 UTC
function isChannelRepodataRequired contains this logic (simplified):

DistChannelMap channelDist = ChannelFactory.lookupDistChannelMap(toConsider);
        if (channelDist != null) {
            repodataRequired = true;
        }
        return repodataRequired;

But lookupDistChannelMap return null since rhnDistChannelMap is not populated for z-streams.
SQL> select ID, LABEL from rhnchannel, rhnDistChannelMap where rhnchannel.id=rhnDistChannelMap.channel_id and label like 'rhel-x86_64-server%' ;

        ID
----------
LABEL
--------------------------------------------------------------------------------
       227
rhel-x86_64-server-5

       331
rhel-x86_64-server-5-appstk-2

       254
rhel-x86_64-server-cluster-5


        ID
----------
LABEL
--------------------------------------------------------------------------------
       255
rhel-x86_64-server-cluster-storage-5

       232
rhel-x86_64-server-vt-5


SQL> select ID, LABEL from rhnchannel, rhnDistChannelMap where rhnchannel.id=rhnDistChannelMap.channel_id and label like '%-5.%.z' ;

no rows selected

Comment 4 Miroslav Suchý 2009-09-30 13:58:40 UTC
Commited to spacewalk git as 4f4be35b9258cd089fce4fc14389222f596bc2a0

Comment 12 Miroslav Suchý 2010-08-10 13:01:55 UTC
Cherrypicked to satellite.git as commit f3b52f91a30b14ef65a86563d81eae2820fb881d

Comment 13 Šimon Lukašík 2010-09-24 07:23:30 UTC
QA: Changing to VERIFIED:

Testing procedure:
reproducer from comment 0

Testing results:
Repo cache status started to regenerate immediately after the upgrade. repomd.xml is available for client system after repo generation. Update of client works well.

Verified against: rhel5-x86_64-server-5 (one variant only)
spacewalk-java-lib-0.5.44-92
spacewalk-java-config-0.5.44-92
spacewalk-taskomatic-0.5.44-92
spacewalk-java-0.5.44-92

Thanks for the fix!

Comment 15 errata-xmlrpc 2010-11-18 08:28:30 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-2010-0897.html


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