Bug 976579

Summary: RHEL5 repositories contain yum metadata in the distribution files in pulp
Product: [Retired] Pulp Reporter: Michael Hrivnak <mhrivnak>
Component: rpm-supportAssignee: Jason Connor <jconnor>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: high Docs Contact:
Priority: urgent    
Version: 2.1.1CC: jortel, mmccune, omaciel
Target Milestone: ---Keywords: Triaged
Target Release: 2.1.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 976575 Environment:
Last Closed: 2013-09-10 15:45:38 UTC Type: Bug
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: 976575, 997098    

Comment 1 Michael Hrivnak 2013-06-20 21:39:11 UTC
This will become a 2.1.3 release.

Comment 2 Mike McCune 2013-06-26 15:59:26 UTC
The end result of this is:

during kickstart, anaconda looks for yum metadata in:

 Server/repodata/repomd.xml

which points to packages that don't exist in the repository.

It should be falling back on the repodata in:

repodata/repomd.xml

which is the correct repodata generated by pulp.

The end result of this is a 404 during provisioning and Anaconda stops with a abort/retry

Comment 3 Mike McCune 2013-06-26 17:37:29 UTC
More information, the paths are changing when the repo gets published which we think is causing the 404 on one of the first packages Anaconda fetches, setuptool:

upstream: 

https://cdn.redhat.com/content/dist/rhel/server/5/5Server/x86_64/os/Packages/setuptool-1.19.2-1.x86_64.rpm

filesystem:

/var/lib/pulp/published/http/repos/Development/dev/rhel5-x86_64/content/dist/rhel/server/5/5Server/x86_64/os/setuptool-1.19.2-1.x86_64.rpm

note that upstream the package is located as referenced in the primary.xml: relative to the repodata: 

<location href="../Packages/setuptool-1.19.2-1.x86_64.rpm"/>

but there is no ../Packages directory on the filesystem

Comment 4 Mike McCune 2013-06-26 19:39:34 UTC
screenshot of the 404:

http://mmccune.fedorapeople.org/scratch/ks-404.png

different package name but same effect

Comment 5 Jason Connor 2013-06-27 15:26:24 UTC
fix in and merged into our pulp-2.1 branch, build forthcoming

Comment 6 Jeff Ortel 2013-06-27 18:07:22 UTC
build: 2.1.3-0.1.beta

Comment 7 Michael Hrivnak 2013-06-28 13:49:03 UTC
https://github.com/pulp/pulp_rpm/pull/266

Comment 8 Preethi Thomas 2013-06-28 19:45:45 UTC
Synced RHEL5 repo and published to http.

Used the rhel5 repo to kickstart a vm successfully


[root@ibm-x3550m3-09 ~]# pulp-admin rpm repo list
+----------------------------------------------------------------------+
                            RPM Repositories
+----------------------------------------------------------------------+

Id:                  rhel5-4-9
Display Name:        rhel5-4-9
Description:         None
Content Unit Counts: 
  Distribution:           1
  Erratum:                2738
  Package Category:       6
  Package Group:          99
  Rpm:                    15184
  Yum Repo Metadata File: 1


[root@ibm-x3550m3-09 ~]# pulp-admin rpm repo list --details
+----------------------------------------------------------------------+
                            RPM Repositories
+----------------------------------------------------------------------+

Id:                  rhel5-4-9
Display Name:        rhel5-4-9
Description:         None
Content Unit Counts: 
  Distribution:           1
  Erratum:                2738
  Package Category:       6
  Package Group:          99
  Rpm:                    15184
  Yum Repo Metadata File: 1
Notes:               
Importers:           
  Config:           
    Feed SSL Configured: True
    Feed URL:            https://cdn.redhat.com/content/dist/rhel/rhui/server/5/
                         5.9/x86_64/os/
         Version: 3 (0x2)Certificate:
             91:8a:cf:ca:85:00:00:00er:
                         Signature Algorithm: sha1WithRSAEncryption
                         Issuer: C=US, ST=North Carolina, L=Raleigh, O=Red Hat,
                         Inc., OU=Red Hat Network, CN=Entitlement Master
                         CA/emailAddress=ca-support
             Not Before: Mar 18 11:24:54 2010
             Not After : Mar 13 11:24:54 2030 GMT
                         Subject: C=US, ST=North Carolina, O=Red Hat, Inc.,
                         OU=Red Hat Network, CN=Red Hat Entitlement Operations
                         Authority/emailAddress=ca-support
             Public Key  Subject Public Key Info:
             RSA Public Key:orithm: rsaEncryption
                 Modulus (4096 bit):
                         00:bb:26:8a:88:43:9c:db:c8:a4:13:19:54:94:79:
                      
                         c0:44:3b:93:91:bc:ed:6a:70:cd:c0:bc:cb:a7:8f:
                 Exponent: 65537 (0x10001)
             X509v3 Subject Key extensions:
                         Identifier: 
                         C4:49:78:56:45:9D:1E:2C:61:60:C3:66:4B:58:05:37:2F:03:2
             X509v3 Authority Key Identifier: 
                         keyid:88:4B:A6:45:C4:46:EC:8F:D6:CF:A6:F6:1A:CF:26:3C:9
                 DirName:/C=US/ST=North
                         Carolina/L=Raleigh/O=Red Hat, Inc./OU=Red Hat
                         Network/CN=Entitlement Master
                         CA/emailAddress=ca-support
             X509v3      serial:E6:FE:42:28:25:C9:E6:5E
                 CA:TRUE Basic Constraints: 
                 Certificate Sign,y Usage: 
             Netscape Cert Type: 
             X509v3 SubjectL CA, S/MIME CA
                         Alternative Name: 
             X509v3 Issuermail:ca-support
                         Alternative Name: 
     Signature Algorithm:email:ca-support
                         sha1WithRSAEncryption
                     21:5c:fa:26:a0:e1:e5:f1:
                         a6:38:7d:45:fa:f7:ee:99:92:b3:5b:bf:0b:95:50:f6:41:8d:
                         79:ae:60:a1:d2:2f:7e:01:40:a2:52:c3:72:61:d2:5b:49:90:
 -----BEGIN CERTIFICATE-----88:53:c1:c2:5c:14:a1
                         MIIHZTCCBU2gAwIBAgIJAJGKz8qFAAAAMA0GCSqGSIb3DQEBBQUAMIG
                     
                         KWApIVqO27uhL6YxXDFi6n7RXACEIVz6JqDh5fGmOH1F+vfumZKzW78
 rmCh0i9+AUCiUsNyYdJbSZDPiFPBwlwUoQ==
 -----BEGIN CERTIFICATE-------END CERTIFICATE-----
                         MIIHZDCCBUygAwIBAgIJAOb+QiglyeZeMA0GCSqGSIb3DQEBBQUAMIG
                      
                         CERTIFICATE-----
  Id:               yum_importer
  Importer Type Id: yum_importer
  Last Sync:        2013-06-28T11:23:18-04:00
  Repo Id:          rhel5-4-9
  Scheduled Syncs:  
Distributors:        
  Auto Publish:        True
  Config:              
    Http:         True
    Https:        True
    Relative URL: /content/dist/rhel/rhui/server/5/5.9/x86_64/os/
  Distributor Type Id: yum_distributor
  Id:                  yum_distributor
  Last Publish:        2013-06-28T11:31:39-04:00
  Repo Id:             rhel5-4-9
  Scheduled Publishes: 


Kickstarting a vm with the pulp published repo

 virt-install -n pulp-213 --disk path=/dev/vg_qeblade20/pulp213 -l http://ibm-x3550m3-09.lab.eng.brq.redhat.com/pulp/repos/content/dist/rhel/rhui/server/5/5.9/x86_64/os/ -r 4096 -w bridge:br0 --prompt

Comment 9 Og Maciel 2013-06-28 21:53:03 UTC
I have taken a RHEL 6 repo that Preethi had synced and kickstarted a vm using the published repo as well (which succeeded):

virt-install -n pulp-el6 --disk path=/dev/vg_qeblade20/pulp-el6 -l http://pulp-v2-server.usersys.redhat.com/pulp/repos/content/dist/rhel/rhui/server/6/6.2/x86_64/os/ -r 4096 -w bridge:br0 --prompt

As per Preethi instructions this concludes the tests required to validate this issue, so I'm marking it as VERIFIED.

Comment 10 Preethi Thomas 2013-09-10 15:45:38 UTC
2.2 released
http://repos.fedorapeople.org/repos/pulp/pulp/stable/2.2/