Bug 993452 - admin-client uploads have invalid location tag in primary.xml (show stopper for uploaded content)
Summary: admin-client uploads have invalid location tag in primary.xml (show stopper f...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: 2.2 Beta
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ---
: 2.2.0
Assignee: Michael Hrivnak
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-06 00:56 UTC by Ryan Bowlby
Modified: 2013-09-10 15:43 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-10 15:43:14 UTC
Embargoed:


Attachments (Terms of Use)

Description Ryan Bowlby 2013-08-06 00:56:18 UTC
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):


2.2.0-0.20.beta

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:

/var/lib/pulp/uploads/341afbe8-d831-45e3-b62a-0605ce5f2a2e

Comment 1 Michael Hrivnak 2013-08-06 15:41:19 UTC
https://github.com/pulp/pulp_rpm/pull/297

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 14:49:21 UTC
build: 2.2.0-0.25.beta.

Comment 3 Preethi Thomas 2013-08-12 19:48:30 UTC
verified
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 15:43:14 UTC
2.2 released
http://repos.fedorapeople.org/repos/pulp/pulp/stable/2.2/


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