Bug 993452 - admin-client uploads have invalid location tag in primary.xml (show stopper for uploaded content)
admin-client uploads have invalid location tag in primary.xml (show stopper f...
Product: Pulp
Classification: Community
Component: user-experience (Show other bugs)
2.2 Beta
Unspecified Unspecified
urgent Severity high
: ---
: 2.2.0
Assigned To: Michael Hrivnak
Preethi Thomas
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2013-08-05 20:56 EDT by Ryan Bowlby
Modified: 2013-09-10 11:43 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-09-10 11:43:14 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ryan Bowlby 2013-08-05 20:56:18 EDT
Description of problem:

RPMs uploaded to a Pulp 2.2 repository have an invalid location tag in the generated primary.xml.gz file. The invalide primary.xml.gz data exists in the rpm_units mongo collection as well:

<location href=\"d156c32d-dd83-4264-b88b-a082c782329f\"/>\n

It appears that the location is pointing to the tempdir within /var/lib/pulp/uploads that existed at the time the metadata was created within the database.

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


How reproducible:

Steps to Reproduce:
1. Upload an RPM to a pulp repo using pulp-admin CLI
2. Publish repo
3. zcat *primary.xml.gz*

Actual results:

<location href=\"d156c32d-dd83-4264-b88b-a082c782329f\"/>\n

Expected results:

<location href="some_awesome_rpm.rpm"/>\n

Additional info:

I did some logging within pulp_rpm and the pulp_rpm.plugins.importers.yum.upload filepath being passed to the pulp_rpm.plugins.importers.yum.parse.rpm metadata function looks like:

Comment 1 Michael Hrivnak 2013-08-06 11:41:19 EDT

This was thankfully an easy fix. We just needed to generate the repo medadata after moving the file into its final location, instead of doing it before.
Comment 2 Jeff Ortel 2013-08-12 10:49:21 EDT
build: 2.2.0-0.25.beta.
Comment 3 Preethi Thomas 2013-08-12 15:48:30 EDT
checked the location after upload & publish of an rpm in *-primary.xml.gz

<location href="pulp-dot-2.0-test-0.1.2-1.fc11.x86_64.rpm"/>
Comment 4 Preethi Thomas 2013-09-10 11:43:14 EDT
2.2 released

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