Bug 782877

Summary: error syncing cloned file repos
Product: [Retired] Pulp Reporter: Preethi Thomas <pthomas>
Component: user-experienceAssignee: Pradeep Kilambi <pkilambi>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecified   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Preethi Thomas 2012-01-18 19:01:30 UTC
Description of problem

Syncing a cloned file repo fails 

Version-Release number of selected component (if applicable):
[root@preethi ~]# rpm -q pulp
pulp-0.0.258-1.fc15.noarch


How reproducible:


Steps to Reproduce:
1. create a file repo ( I created a file repo and uploaded files using content upload)
2. clone the file repo (I cloned it with a --feed=parent)
3. sync the cloned repo
  
Actual results:

root@preethi ~]# pulp-admin -u admin -p admin repo sync --id=file-repo-clone -F
Sync for repository file-repo-clone started
Sync: Error

Item Details: 
File: 1/3
error:  Error: `/var/lib/pulp/repos/content-repo-file/PULP_MANIFEST` and `/var/lib/pulp//repos/file-repo-clone/PULP_MANIFEST` are the same file

Expected results:


Additional info:
2012-01-18 14:14:31,829 6330:139987009926912: pulp.server.webservices.controllers.repositories:INFO: repositories:1175 sync timeout passed : None
2012-01-18 14:14:31,883 6330:139985978115840: pulp.server.api.repo_sync:INFO: repo_sync:254 Sync invoked for repo <file-repo-clone>
2012-01-18 14:14:31,885 6330:139985978115840: pulp.server.api.repo_sync:INFO: repo_sync:268 Sync of file-repo-clone starting, skip_dict = {}
2012-01-18 14:14:31,888 6330:139985978115840: pulp.server.api.synchronizers:INFO: synchronizers:1297 sync of /var/lib/pulp//repos/content-repo-file for repo file-repo-clone
2012-01-18 14:14:31,889 6330:139985978115840: pulp.server.api.synchronizers:INFO: synchronizers:1313 Working on 0/3
2012-01-18 14:14:31,892 6330:139985978115840: pulp.server.tasking.task:ERROR: task:455 Task failed: Task a67e8bb8-4208-11e1-ad16-002564a85a58: _sync(file-repo-clone, synchronizer=<pulp.server.api.synchronizers.FileSynchronizer object at 0x7f5139bd7710>, skip={}, max_speed=None, threads=None, progress_callback=<bound method RepoSyncTask.progress_callback of <pulp.server.api.repo_sync_task.RepoSyncTask object at 0x7f5139bd7d90>>)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/server/tasking/task.py", line 404, in run
    result = self.callable(*self.args, **self.kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/api/repo_sync.py", line 272, in _sync
    progress_callback, synchronizer, max_speed, threads)
  File "/usr/lib/python2.7/site-packages/pulp/server/api/repo_sync.py", line 350, in fetch_content
    progress_callback, max_speed, threads)
  File "/usr/lib/python2.7/site-packages/pulp/server/api/synchronizers.py", line 162, in sync
    max_speed=max_speed, threads=threads)
  File "/usr/lib/python2.7/site-packages/pulp/server/api/synchronizers.py", line 1321, in local
    shutil.copy(pkg, dst_file_path)
  File "/usr/lib64/python2.7/shutil.py", line 116, in copy
    copyfile(src, dst)
  File "/usr/lib64/python2.7/shutil.py", line 68, in copyfile
    raise Error("`%s` and `%s` are the same file" % (src, dst))
Error: `/var/lib/pulp/repos/content-repo-file/PULP_MANIFEST` and `/var/lib/pulp//repos/file-repo-clone/PULP_MANIFEST` are the same file

Comment 1 Pradeep Kilambi 2012-01-19 17:07:36 UTC
commit b8b2d0c8470cbc245f9e109103168996388a835f

Comment 2 Jeff Ortel 2012-01-21 00:23:03 UTC
build: 0.259

Comment 3 Preethi Thomas 2012-01-24 20:07:10 UTC
verified
[root@preethi ~]# rpm -q pulp
pulp-0.0.261-1.fc15.noarch

[root@preethi ~]# pulp-admin content upload  /root/upload/test2.txt -r content -v
* Starting Content Upload

* Performing Content Uploads to Pulp server
Successfully uploaded [test2.txt] to server

* Performing Repo Associations 

Content association Complete for Repo [content]: 
 Packages: 
None 
 
 Files: 
test2.txt

* Content Upload complete.
[root@preethi ~]# pulp-admin repo clone --id=content --clone_id=content-clone --feed=parent -F
Repository [content] is being cloned as [content-clone]
Clone: Finished
Item Details: 
File: 3/3

[root@preethi ~]# pulp-admin repo sync --id=content-clone -F
Sync for repository content-clone started
Sync: Finished
0/3 new items downloaded
3/3 existing items processed

Item Details: 
File: 3/3

[root@preethi ~]#

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

Comment 5 Preethi Thomas 2012-02-24 20:18:05 UTC
Pulp v1.0 is released.