Bug 668000 - Repo with spaces in the ID cannot be deleted
Summary: Repo with spaces in the ID cannot be deleted
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
: ---
Assignee: John Matthews
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: verified-to-close
TreeView+ depends on / blocked
 
Reported: 2011-01-07 16:11 UTC by Jay Dobies
Modified: 2011-08-16 14:00 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-08-16 14:00:02 UTC
Embargoed:


Attachments (Terms of Use)

Description Jay Dobies 2011-01-07 16:11:35 UTC
I tried creating a repo with spaces in the name:

pulp-admin repo create --id "jdob repo"

That worked successfully and I saw the directory under /var/lib/pulp. However, I cannot delete the repo:

-> sudo pulp-admin repo list
+------------------------------------------+
       List of Available Repositories
+------------------------------------------+

Label              	pulp-testing             
Name               	pulp-testing             
FeedURL            	http://repos.fedorapeople.org/repos/pulp/pulp/testing/fedora-14/x86_64
FeedType           	yum                      
Arch               	noarch                   
Sync Schedule      	None                     
Packages           	10                       
Files              	0                        
Distributions      	None                     
Publish            	True                     
Clones             	[]                       
Groups             	None                     


Label              	jdob repo                
Name               	jdob repo                
FeedURL            	None                     
FeedType           	None                     
Arch               	noarch                   
Sync Schedule      	None                     
Packages           	0                        
Files              	0                        
Distributions      	None                     
Publish            	True                     
Clones             	[]                       
Groups             	None                     


 -> sudo pulp-admin repo delete --id "jdob repo"
Successful deleted repository [ jdob repo ]

 -> sudo pulp-admin repo list
+------------------------------------------+
       List of Available Repositories
+------------------------------------------+

Label              	pulp-testing             
Name               	pulp-testing             
FeedURL            	http://repos.fedorapeople.org/repos/pulp/pulp/testing/fedora-14/x86_64
FeedType           	yum                      
Arch               	noarch                   
Sync Schedule      	None                     
Packages           	10                       
Files              	0                        
Distributions      	None                     
Publish            	True                     
Clones             	[]                       
Groups             	None                     


Label              	jdob repo                
Name               	jdob repo                
FeedURL            	None                     
FeedType           	None                     
Arch               	noarch                   
Sync Schedule      	None                     
Packages           	0                        
Files              	0                        
Distributions      	None                     
Publish            	True                     
Clones             	[]                       
Groups             	None                     


It's not just a database thing; the directories on the file system still exist as well. There were no errors in the pulp server logs.

Comment 1 John Matthews 2011-01-12 15:52:53 UTC
We weren't encoding the spaces in the URL, so we ended up with a 404.

Example before change:
$ sudo pulp-admin repo delete --id "test with spaces"
_request calling: /pulp/api//repositories/test with spaces/ to host:port : jwm-devel.home:443
Request_type: DELETE
info: None
headers: {'Accept-Language': 'en-us', 'Content-type': 'application/json', 'Accept': 'application/json', 'Authorization': ''}
404 /pulp/api//repositories/test with spaces/, not found


After change:
$ sudo pulp-admin repo delete --id "test with spaces"
_request calling: /pulp/api//repositories/test%20with%20spaces/ to host:port : jwm-devel.home:443
Request_type: DELETE
info: None
headers: {'Accept-Language': 'en-us', 'Content-type': 'application/json', 'Accept': 'application/json', 'Authorization': ''}


Commit:
http://git.fedorahosted.org/git/?p=pulp.git;a=commit;h=d0fc22b3887e712f1004bb9e4b9b1d485b620a5f

Comment 2 Jay Dobies 2011-01-12 19:36:59 UTC
Fixed in build 0.123.

Comment 3 Preethi Thomas 2011-01-13 16:46:05 UTC
verified
[root@preethi ~]# rpm -q pulp
pulp-0.0.123-1.fc14.noarch

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

Id                      foo1234                  
Name                    foo1234                  
FeedURL                 None                     
FeedType                None                     
Arch                    noarch                   
Sync Schedule           None                     
Packages                2                        
Files                   0                        
Distributions           None                     
Publish                 True                     
Clones                  []                       
Groups                  None                     


Id                      pulp-repo                
Name                    pulp-repo                
FeedURL                 http://repos.fedorapeople.org/repos/pulp/pulp/testing/fedora-13/x86_64/
FeedType                yum                      
Arch                    x86_64                   
Sync Schedule           None                     
Packages                10                       
Files                   0                        
Distributions           None                     
Publish                 True                     
Clones                  []                       
Groups                  None                     


Id                      space repo               
Name                    space repo               
FeedURL                 None                     
FeedType                None                     
Arch                    noarch                   
Sync Schedule           None                     
Packages                0                        
Files                   0                        
Distributions           None                     
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                     


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

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

Id                      foo1234                  
Name                    foo1234                  
FeedURL                 None                     
FeedType                None                     
Arch                    noarch                   
Sync Schedule           None                     
Packages                2                        
Files                   0                        
Distributions           None                     
Publish                 True                     
Clones                  []                       
Groups                  None                     


Id                      pulp-repo                
Name                    pulp-repo                
FeedURL                 http://repos.fedorapeople.org/repos/pulp/pulp/testing/fedora-13/x86_64/
FeedType                yum                      
Arch                    x86_64                   
Sync Schedule           None                     
Packages                10                       
Files                   0                        
Distributions           None                     
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

Comment 4 Preethi Thomas 2011-08-16 14:00:02 UTC
Closing with Community Release 15

pulp-0.0.223-4.


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