Bug 672347

Summary: Need a cleaner error message when a non existing repo is deleted
Product: [Retired] Pulp Reporter: Preethi Thomas <pthomas>
Component: z_otherAssignee: Pradeep Kilambi <pkilambi>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: skarmark
Target Milestone: ---Keywords: Triaged
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 12:08:12 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: 647488    

Description Preethi Thomas 2011-01-24 21:51:00 UTC
[root@preethi ~]# rpm -q pulp
pulp-0.0.131-1.fc14.noarch

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

Id                 	f14                      
Name               	f14                      
FeedURL            	http://download.devel.redhat.com/released/F-14/GOLD/Fedora/x86_64/os/
FeedType           	yum                      
Arch               	x86_64                   
Sync Schedule      	None                     
Packages           	2766                     
Files              	0                        
Distributions      	ks-f14-x86_64            
Publish            	True                     
Clones             	[]                       
Groups             	None                     


Id                 	f13                      
Name               	f13                      
FeedURL            	http://download.devel.redhat.com/released/F-13/GOLD/Fedora/x86_64/os/
FeedType           	yum                      
Arch               	x86_64                   
Sync Schedule      	None                     
Packages           	3102                     
Files              	0                        
Distributions      	ks-f13-x86_64            
Publish            	True                     
Clones             	[]                       
Groups             	None                     


Id                 	f14-update               
Name               	f14-updates              
FeedURL            	http://ftp.linux.ncsu.edu/pub/fedora/linux//updates/14/x86_64/
FeedType           	yum                      
Arch               	noarch                   
Sync Schedule      	None                     
Packages           	5553                     
Files              	0                        
Distributions      	None                     
Publish            	True                     
Clones             	[]                       
Groups             	None                     


[root@preethi ~]# pulp-admin repo delete --id=f13-
error: operation failed: Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/base.py", line 57, in report_error
    return method(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/role_check.py", line 131, in check_roles
    result = f(instance, *fargs, **kw)
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/repositories.py", line 173, in DELETE
    api.delete(id=id)
  File "/usr/lib/python2.7/site-packages/pulp/server/compat.py", line 40, in _decorator
    return decorator(*args,**kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/auditing.py", line 204, in _audit
    result = method(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/api/repo.py", line 429, in delete
    repo = self._get_existing_repo(id)
  File "/usr/lib/python2.7/site-packages/pulp/server/api/repo.py", line 106, in _get_existing_repo
    raise PulpException("No Repo with id: %s found" % id)
PulpException: u'No Repo with id: f13- found'

Comment 1 Sayli Karmarkar 2011-03-14 23:20:05 UTC
This seems to be fixed because of jconnor and jmatthews's fixes for server side
traceback.

$ sudo pulp-admin repo delete --id=non-existent-repo
error: operation failed: PulpException: u'No Repo with id: non-existent-repo found'

Comment 2 Preethi Thomas 2011-03-28 14:51:42 UTC
verified


[root@preethi ~]# rpm -q pulp
pulp-0.0.157-1.git.1.1ea502c.fc14.noarch
[root@preethi ~]# pulp-admin repo delete --id=test
error: operation failed: PulpException: u'No Repo with id: test found'

Comment 3 Preethi Thomas 2011-08-16 12:08:12 UTC
Closing with Community Release 15

pulp-0.0.223-4.

Comment 4 Preethi Thomas 2011-08-16 12:21:22 UTC
Closing with Community Release 15

pulp-0.0.223-4.