Bug 735433 - Cloning through API with specifying relative_path does not place the RPMs into the relative_path dir
Summary: Cloning through API with specifying relative_path does not place the RPMs int...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: Sprint 28
Assignee: Sayli Karmarkar
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-02 15:42 UTC by Ivan Necas
Modified: 2015-03-23 01:10 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-24 20:14:11 UTC


Attachments (Terms of Use)

Description Ivan Necas 2011-09-02 15:42:58 UTC
Description of problem:
In Katello we need to clone repos with specifying relative paths (we create a hierarchial structure depending on organizations and environments). Pulp provides the possibility to specify ralative_path in API when cloning. But the cloning itself is broken.

Version-Release number of selected component (if applicable):
pulp-0.0.223-4.fc15.noarch

How reproducible:

Steps to Reproduce:
1.create a repo (using relativa path as well - but probably without the relative path it fails as well)
2.sync the repo
3.clone this repo using relative path, in our case:

Resource POST request: /pulp/api/repositories/1314975288837-base-one-ACME_Corporation/clone/, {"relative_path":"ACME_Corporation/Test/ruby/base-one","feed":"parent","groupid":["product:1314975288837","env:2","org:1"],"clone_id":"1314975288837-base-one-Test-ACME_Corporation","clone_name":"base-one"}
  
Actual results:
The mirrored repo is ok, but the cloned is broken. There are no RPMs in
/var/lib/pulp/repos/ACME_Corporation/Test/ruby/base-one 
, but repodata are there.

The RPMs are in /var/lib/pulp/repos/1314975288837-base-one-Test-ACME_Corporation/


Expected results:
The RPMs are in:
/var/lib/pulp/repos/ACME_Corporation/Test/ruby/base-one 

Additional info:
This is needed for consuming a subscription in Candlepin through Katello.

https://bugzilla.redhat.com/show_bug.cgi?id=735353

Comment 1 Sayli Karmarkar 2011-09-08 16:36:41 UTC
Fixed. Now for local syncs and repo clones, if relative_path is specified, RPMs are placed in that path instead of default clone_id path. Moving to modified. 

However, please note that we are currently not handling any conflicts with respect to relative_paths. Nothing will stop you from creating a repo with relative_path as that of an existing repo. We will be working on solving this and other relative_path related issues.

Comment 3 Sayli Karmarkar 2011-09-08 19:56:51 UTC
Commit details -

1. 

commit 1bce3f3b698bc3cdf2a5e3bccefb2e5a8f0d6fca
Author: Sayli Karmarkar <skarmark@redhat.com>
Date:   Wed Sep 7 23:56:46 2011 -0700

    735433 - Added fix for cloning through API with relative_path not placing RPMs into the relative_path dir and added cli option for specifying relative_path while cloning.

src/pulp/client/admin/plugins/repo.py
src/pulp/server/api/repo_sync.py
src/pulp/server/api/synchronizers.py


2. 

commit d550734d5c9dc71914d0fda64ec2d601135a2355
Author: Sayli Karmarkar <skarmark@redhat.com>
Date:   Thu Sep 8 09:46:05 2011 -0700

    735433 - Added similar fix for file based syncs as well.

src/pulp/server/api/synchronizers.py

Comment 4 Jeff Ortel 2011-09-08 21:03:48 UTC
build: 0.230-2

Comment 6 Preethi Thomas 2011-09-15 19:27:36 UTC
verified

[root@katello-test ~]# ls -l /var/lib/pulp/repos/relative_path_test/
total 196
drwxr-sr-x. 3 apache apache   4096 Sep 15 15:02 images
drwxr-sr-x. 2 apache apache 188416 Sep 15 14:53 Packages
drwxr-sr-x. 2 apache apache   4096 Sep 15 15:05 repodata
[root@katello-test ~]# 
[root@katello-test ~]# rpm -q pulp
pulp-0.0.231-1.el6.noarch
[root@katello-test ~]# 
[root@katello-test ~]# 
[root@katello-test ~]# pulp-admin repo list
error: operation failed: No valid authorization credentials found, please see: pulp-admin --help
[root@katello-test ~]# pulp-admin -u admin -p admin repo list
+------------------------------------------+
       List of Available Repositories
+------------------------------------------+

Id                 	f14                      
Name               	f14                      
Feed URL           	http://download.devel.redhat.com/released/F-14/GOLD/Fedora/x86_64/os
Feed Type          	remote                   
Content Type       	yum                      
Feed Certs         	CA:No   Cert:No
Consumer Certs     	CA:No   Cert:No
Architecture       	noarch                   
Sync Schedule      	None                     
Packages           	2766                     
Files              	0                        
Distributions      	ks-f14-noarch            
Publish            	True                     
Clones             	[u'f14-clone']           
Groups             	None                     
Filters            	[]                       
Notes              	{}                       


Id                 	f14-clone                
Name               	f14-clone                
Feed URL           	http://download.devel.redhat.com/released/F-14/GOLD/Fedora/x86_64/os
Feed Type          	remote                   
Content Type       	yum                      
Feed Certs         	CA:No   Cert:No
Consumer Certs     	CA:No   Cert:No
Architecture       	noarch                   
Sync Schedule      	None                     
Packages           	2766                     
Files              	0                        
Distributions      	ks-f14-clone-noarch      
Publish            	True                     
Clones             	[]                       
Groups             	None                     
Filters            	[]                       
Notes              	{}

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

Comment 8 Preethi Thomas 2012-02-24 20:19:00 UTC
Pulp v1.0 is released.


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