Bug 648918

Summary: Cloned repo delete problem
Product: [Retired] Pulp Reporter: Preethi Thomas <pthomas>
Component: z_otherAssignee: Sayli Karmarkar <skarmark>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: cperry
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: 2011-08-16 13:59:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 641987    

Description Preethi Thomas 2010-11-02 14:10:05 UTC
Description of problem:


deleting a cloned repo deletes the repo from the database (repo list does not display it). But the contents in the directory still exists.

Also the the repo that it was cloned from still shows the deleted repo as cloned.




[root@preethi ~]# pulp-admin repo delete   --id=clone_f13_test_relative
Successful deleted repository [ clone_f13_test_relative ]

[root@preethi ~]# pulp-admin repo list
+------------------------------------------+
       List of Available Repositories
+------------------------------------------+



Label              	f13_test_relative        
Name               	f13_test_relative        
FeedURL            	http://repos.fedorapeople.org/repos/pulp/pulp/testing/fedora-13/x86_64/
FeedType           	yum                      
Arch               	noarch                   
Sync Schedule      	*/5 * * * *              
Packages           	10                       
Files              	0                        
Publish            	True                     
Clones             	[u'clone_f13_test_relative']


See here    

 Clones             	[u'clone_f13_test_relative']


Now if I try to delete the parent repo it fails 

[root@preethi clone_f13_test_relative]# pulp-admin repo delete   --id=f13_test_relative
error: operation failed: "Traceback (most recent call last):\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/base.py\", line 51, in report_error\n    return method(self, *args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/role_check.py\", line 102, in check_roles\n    result = f(instance, *fargs, **kw)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/repositories.py\", line 166, in DELETE\n    api.delete(id=id)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/event/dispatcher.py\", line 103, in call\n    retval = fn(*args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/auditing.py\", line 195, in _audit\n    result = method(*args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/api/repo.py\", line 392, in delete\n    cloned_repo = self._get_existing_repo(clone_id)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/api/repo.py\", line 94, in _get_existing_repo\n    raise PulpException(\"No Repo with id: %s found\" % id)\nPulpException: u'No Repo with id: clone_f13_test_relative found'\n"

You have new mail in /var/spool/mail/root

Comment 1 Sayli Karmarkar 2010-11-04 19:02:43 UTC
This is fixed in the current QE build as well.

Comment 2 Preethi Thomas 2010-11-08 13:43:06 UTC
verified


[root@preethi ~]# pulp-admin repo delete --id=clone_f13 
Successful deleted repository [ clone_f13 ]

[root@preethi ~]#  pulp-admin repo list
+------------------------------------------+
       List of Available Repositories
+------------------------------------------+

Label              	f13                      
Name               	f13                      
FeedURL            	http://download.devel.redhat.com/released/F-13/GOLD/Fedora/x86_64/os/
FeedType           	yum                      
Arch               	x86_64                   
Sync Schedule      	03 *
* * *               
Packages           	3102                     
Files              	8                        
Publish            	True                     
Clones             	[]                       


Label              	f14                      
Name               	f14                      
FeedURL            	http://download.fedora.redhat.com/pub/fedora/linux/releases/14/Fedora/x86_64/os/
FeedType           	yum                      
Arch               	x86_64                   
Sync Schedule      	None                     
Packages           	2766                     
Files              	6                        
Publish            	True                     
Clones             	[]                       


[root@preethi ~]# pulp-admin repo delete --id=f13
Successful deleted repository [ f13 ]

Comment 3 Preethi Thomas 2011-08-16 13:59:40 UTC
Closing with Community Release 15

pulp-0.0.223-4.