Bug 712521

Summary: Pulp Assumes rpms are beside repodata directory
Product: [Retired] Pulp Reporter: Jay Greguske <jgreguske>
Component: z_otherAssignee: Pradeep Kilambi <pkilambi>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: jmatthew, skarmark
Target Milestone: ---Keywords: Triaged
Target Release: Sprint 25   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-24 20:11:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jay Greguske 2011-06-10 20:51:32 UTC
Description of problem:

Pulp appears to assume that packages in a yum repo exist besides the repodata directory. If you use a yum repo produced by Koji, you'll get 404s when it tries to download the RPMs.

How reproducible:
Always

Steps to Reproduce:
1. $ pulp-admin repo create --id whatever --feed 'http://download.lab.bos.redhat.com/brewroot/repos/eso-rhel-6-build/latest/x86_64' --interval P1DT --name 'my repo'
2. $ pulp-admin repo sync --id eso-6-x86_64 -F
  
Actual results:
Sync for repository eso-6-x86_64 started
Sync: Finished
0/5001 new items downloaded
5001/5001 existing items processed

Item Details: 
Rpms: 0/5001
Warning: 5001 errors occurred
5001 Rpm Error(s):
        HTTP status code of 404 received for http://download.lab.bos.redhat.com/brewroot/repos/eso-rhel-6-build/latest/x86_64/packages/redhat-release-server/6Server/6.1.0.2.el6eso/x86_64/redhat-release-server-6Server-6.1.0.2.el6eso.x86_64.rpm
        HTTP status code of 404 received for http://download.lab.bos.redhat.com/brewroot/repos/eso-rhel-6-build/latest/x86_64/packages/incron/0.5.9/2.el6eso/x86_64/incron-0.5.9-2.el6eso.x86_64.rpm
        HTTP status code of 404 received for http://download.lab.bos.redhat.com/brewroot/repos/eso-rhel-6-build/latest/x86_64/packages/inotify-tools/3.14/1.el6eso/x86_64/inotify-tools-devel-3.14-1.el6eso.x86_64.rpm
        HTTP status code of 404 received for http://download.lab.bos.redhat.com/brewroot/repos/eso-rhel-6-build/latest/x86_64/packages/publican-openshift/0.4/3.el6eso/x86_64/publican-openshift-0.4-3.el6eso.x86_64.rpm
        HTTP status code of 404 received for http://download.lab.bos.redhat.com/brewroot/repos/eso-rhel-6-build/latest/x86_64/packages/inotify-tools/3.14/1.el6eso/x86_64/inotify-tools-3.14-1.el6eso.x86_64.rpm
        ... 4996 more error(s) occured.  See server logs for all errors.


Expected results:
Sync correctly.

Additional info:
My from-the-hip-guess is that pulp expects packages to be available at a URL created by concatenating the href attribute in the Location tags with the feed URL. It should consider the "base" attribute instead of the feed URL. If you concatenate base and href, you'll get the correct URL that the repodata is referencing.

You don't get this problem if the packages are next to the repodata directory on the filesystem because base+href produce the same URL as feed+href in that case.

Comment 1 Pradeep Kilambi 2011-07-06 17:25:02 UTC
fixed!commit f79f32bb1dd87726d82f94b2c5ed9564f5f3340b

Comment 2 Pradeep Kilambi 2011-07-06 17:29:39 UTC
fix will be in grinder-0.0.105 and higher

Comment 3 Jay Dobies 2011-07-06 19:04:37 UTC
Fixed in 0.202

Comment 4 Preethi Thomas 2011-08-17 19:38:23 UTC
verified

[root@preethi ~]# rpm -q pulp
pulp-0.0.224-1.fc14.noarch
[root@preethi ~]# 


[root@preethi ~]# pulp-admin repo create --id eso-6-x86_64 --feed=http://download.lab.bos.redhat.com/brewroot/repos/eso-rhel-6-build/latest/x86_64 --content_type=yum
Successfully created repository [ eso-6-x86_64 ]

[root@preethi ~]# pulp-admin repo sync --id=eso-6-x86_64 -F
Sync for repository eso-6-x86_64 started
Sync: Finished
4976/4976 new items downloaded
0/4976 existing items processed

Item Details: 
Rpms: 4976/4976

Comment 5 Preethi Thomas 2012-02-24 20:11:43 UTC
Pulp v1.0 is released
Closed Current Release.