Bug 801090

Summary: Logic for handling orphan packages should account for sub directories
Product: Red Hat Satellite Reporter: Og Maciel <omaciel>
Component: Content ManagementAssignee: Mike McCune <mmccune>
Status: CLOSED WORKSFORME QA Contact: Katello QA List <katello-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: cpelland, mmccune
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 801114 (view as bug list) Environment:
Last Closed: 2012-05-10 23:16:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 801114    
Attachments:
Description Flags
pulp.log
none
grinder.log none

Description Og Maciel 2012-03-07 16:28:24 UTC
Description of problem:

Current logic during synchronization may not be taking into consideration sub directories in href and concatenating the pkg name to repo dir 

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


How reproducible:


Steps to Reproduce:
1. Add a custom repository pointing to latest katello build (see comments for a repository you can use)
2. Synchronize it
3. Promote it to the next available environment
4. Synchronize it again and attempt to promote it to the same environment as before
  
Actual results:

The promotion step fails and pulp.log complains with OSError: [Errno 2] No such file or directory (see attached log).

Grinder shows:

2012-03-06 14:24:15,941 27176:139969332995840: grinder.RepoFetch:INFO: RepoFetch:225 Removing orphan package: /var/lib/pulp//repos/Prague/Library/custom/Automated/katello/packages/createrepo/0.9.8/4.el6/noarch/createrepo-0.9.8-4.el6.noarch.rpm
2012-03-06 14:24:33,846 27176:139969332995840: grinder.RepoFetch:INFO: RepoFetch:225 Removing orphan package: /var/lib/pulp//repos/Prague/Library/custom/Automated/katello/packages/tzdata/2011l/4.el6/noarch/tzdata-java-2011l-4.el6.noarch.rpm
2012-03-06 14:24:33,857 27176:139969332995840: grinder.RepoFetch:INFO: RepoFetch:225 Removing orphan package: /var/lib/pulp//repos/Prague/Library/custom/Automated/katello/packages/tzdata/2011l/4.el6/noarch/tzdata-2011l-4.el6.noarch.rpm


Expected results:


Additional info:

Comment 2 Og Maciel 2012-03-07 16:29:37 UTC
Created attachment 568347 [details]
pulp.log

Comment 3 Og Maciel 2012-03-07 16:30:19 UTC
Created attachment 568348 [details]
grinder.log

Comment 5 Mike McCune 2012-05-10 23:16:35 UTC
I tried repeatedly to reproduce this issue but could not.  Closing and if it shows up again we can re-open. Og: if you have a solid way to reproduce it I'm happy to work on it again