Bug 731159 - repo clone sets GPG key incorrectly
Summary: repo clone sets GPG key incorrectly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 27
Assignee: Sayli Karmarkar
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-16 19:25 UTC by Chris St. Pierre
Modified: 2015-03-23 01:10 UTC (History)
2 users (show)

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


Attachments (Terms of Use)
Patch to fix the path to GPG keys in clone (578 bytes, application/octet-stream)
2011-08-16 19:25 UTC, Chris St. Pierre
no flags Details

Description Chris St. Pierre 2011-08-16 19:25:58 UTC
Created attachment 518558 [details]
Patch to fix the path to GPG keys in clone

Description of problem:

When cloning a repository, it sets the path to the GPG key incorrectly, which prevents the initial sync from succeeding.

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

0.0.223.4, HEAD

How reproducible:

Always

Steps to Reproduce:
1. Create a new repository with a GPG key.
2. Clone it.
  
Actual results:

Clone: Error
Item Details: 
Traceback (most recent call last):
  File "/usr/bin/pulp-admin", line 23, in <module>
    admin.main()
  File "/usr/lib/python2.6/site-packages/pulp/client/lib/cli.py", line 152, in main
    command.main(self.args[1:])
  File "/usr/lib/python2.6/site-packages/pulp/client/pluginlib/command.py", line 129, in main
    action.main(args[1:])
  File "/usr/lib/python2.6/site-packages/pulp/client/pluginlib/command.py", line 211, in main
    self.run()
  File "/usr/lib/python2.6/site-packages/pulp/client/admin/plugins/repo.py", line 603, in run
    self.clone_foreground(task)
  File "/usr/lib/python2.6/site-packages/pulp/client/admin/plugins/repo.py", line 578, in clone_foreground
    raise SyncError(task['traceback'][-1])
repo.SyncError: IOError: [Errno 2] No such file or directory: u'/var/lib/pulp//reposgeneric-5-x86_64-perfsonar/RPM-GPG-KEY-Internet2'

Expected results:

The repo is cloned.

Additional info:

Patch is attached.

Comment 1 Sayli Karmarkar 2011-08-20 22:23:23 UTC
Fixed GPG key location according to recent changes. The patch provided did not work correctly, so I made a small change but basic idea is the same.

$ sudo pulp-admin repo clone --id=spacewalk --clone_id=clone-spacewalk -F  
Repository [spacewalk] is being cloned as [clone-spacewalk]
Clone: Finished
Item Details: 
Rpms: 129/129

Comment 2 Jeff Ortel 2011-08-24 19:46:23 UTC
build: 0.227

Comment 3 Preethi Thomas 2011-08-30 15:42:19 UTC
verified
[root@preethi ~]# rpm -q pulp
pulp-0.0.228-1.fc15.noarch
[root@preethi ~]# 

[root@pulp-f15 gpg]# pulp-admin repo create --id=spacewalk --feed=http://spacewalk.redhat.com/yum/1.0-client/Fedora/12/x86_64/ --gpgkeys=/root/gpg/ 
uploading /root/gpg/RPM-GPG-KEY-spacewalk-2010
Successfully created repository [ spacewalk ]

[root@pulp-f15 gpg]# pulp-admin repo sync --id=spacewalk -F
Sync for repository spacewalk started
Sync: Finished
22/22 new items downloaded
0/22 existing items processed

Item Details: 
Rpms: 22/22

[root@pulp-f15 gpg]# ls /var/lib/pulp/published/
gpg/   ks/    repos/ 
[root@pulp-f15 gpg]# ls /var/lib/pulp/published/gpg/
pulp/           released/       yum/            
pulp-f14-clone/ repo-new/       
[root@pulp-f15 gpg]# ls /var/lib/pulp/published/gpg/
pulp  pulp-f14-clone  released  repo-new  yum
[root@pulp-f15 gpg]# ls /var/lib/pulp/
cache/     init.flag  packages/  published/ repos/     sn.dat     
[root@pulp-f15 gpg]# 
[root@pulp-f15 gpg]# ls
RPM-GPG-KEY-spacewalk-2010
[root@pulp-f15 gpg]# pwd
/root/gpg
[root@pulp-f15 gpg]# ls /var/lib/pulp/published/gpg/
pulp  pulp-f14-clone  released  repo-new  yum
[root@pulp-f15 gpg]# ls /var/lib/pulp/published/
gpg  ks  repos
[root@pulp-f15 gpg]# ls /var/lib/pulp/published/gpg/yum/1.0-client/Fedora/12/x86_64/
RPM-GPG-KEY-spacewalk-2010
[root@pulp-f15 gpg]# pulp-admin repo create --id=spacewalk --clone_id=spacewalk-clone -F
Usage: pulp-admin <options> repo create <options>

pulp-admin: error: no such option: --clone_id
[root@pulp-f15 gpg]# pulp-admin repo clone --id=spacewalk --clone_id=spacewalk-clone -F
Repository [spacewalk] is being cloned as [spacewalk-clone]
Clone: Finished
Item Details: 
Rpms: 22/22

[root@pulp-f15 gpg]# ls /var/lib/pulp/published/
gpg/   ks/    repos/ 
[root@pulp-f15 gpg]# ls /var/lib/pulp/published/gpg/
pulp/            released/        spacewalk-clone/ 
pulp-f14-clone/  repo-new/        yum/             
[root@pulp-f15 gpg]# ls /var/lib/pulp/published/gpg/spacewalk-clone/
RPM-GPG-KEY-spacewalk-2010
[root@pulp-f15 gpg]#

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


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