Bug 993452

Summary: admin-client uploads have invalid location tag in primary.xml (show stopper for uploaded content)
Product: [Retired] Pulp Reporter: Ryan Bowlby <rbowlby83>
Component: user-experienceAssignee: Michael Hrivnak <mhrivnak>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: high Docs Contact:
Priority: urgent    
Version: 2.2 BetaKeywords: Triaged
Target Milestone: ---   
Target Release: 2.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-10 15:43:14 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:

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/