Bug 790791 - Creating a repo with relative path containing space fails with error
Summary: Creating a repo with relative path containing space fails with error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Sayli Karmarkar
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-15 12:09 UTC by Ivan Necas
Modified: 2015-03-23 01:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description Ivan Necas 2012-02-15 12:09:12 UTC
Version-Release number of selected component (if applicable):
pulp-0.0.265-1.fc15.noarch


How reproducible:
Always

Steps to Reproduce:
1. Create a repo with replatve_path containing space

Actual results:

2012-02-15 12:59:49,968 7453:139856147642112: pulp.server.webservices.controllers.decorators:ERROR: decorators:52 Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/decorators.py", line 48, in report_error
    return method(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/decorators.py", line 127, in _auth_decorator
    value = method(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/repositories.py", line 2120, in POST
    return action(id)
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/repositories.py", line 1377, in clone
    publish=repo_data.get('publish', None))
  File "/usr/lib/python2.7/site-packages/pulp/server/api/repo_sync.py", line 99, in clone
    content_types=content_types, publish=publish)
  File "/usr/lib/python2.7/site-packages/pulp/server/api/repo.py", line 324, in create
    pulp.server.util.create_repo(repo_path, checksum_type=r['checksum_type'])
  File "/usr/lib/python2.7/site-packages/pulp/server/util.py", line 552, in create_repo
    raise CreateRepoError(err_msg)
CreateRepoError: Error: Only one directory allowed per run.
  
Expected results:
Successfully created repository

Comment 1 Sayli Karmarkar 2012-02-15 20:04:31 UTC
We have decided not to allow whitespace characters in repo id and relative path
for repositories, so fix for this contains regex checking and ValidationError
when repo id, clone id or relative path contains whitespace characters in it. 

commit 4bd79f12c3b609f9b150b62822d4d09cdc606581
Author: Sayli Karmarkar <skarmark>
Date:   Wed Feb 15 11:59:40 2012 -0800

    789083, 790838, 790791 - Added regex checking and validation error when
repo id or relative path contains whitespace characters

$ sudo pulp-admin repo clone --id test --clone_id "test_clone" --relativepath "
test_whitespace "
error:  operation failed: PulpValidationError: Given relative_path:[
test_whitespace ] is invalid. relative_path should not contain whitespace
characters.

Comment 2 Jeff Ortel 2012-02-17 17:18:01 UTC
build: 0.267

Comment 3 Preethi Thomas 2012-02-17 18:56:19 UTC
verified
[root@preethi ~]# rpm -q pulp
pulp-0.0.267-1.fc15.noarch
[root@preethi ~]# 
[root@preethi ~]# 
[root@preethi ~]# 
[root@preethi ~]# 
[root@preethi ~]#  pulp-admin repo clone --id spacewalk --clone_id "test_clone" --relativepath "
test_whitespace "
error:  operation failed: test_whitespace ] is invalid. relative_path should not contain whitespace characters.
[root@preethi ~]# 
[root@preethi ~]# 
[root@preethi ~]#  pulp-admin repo clone --id spacewalk --clone_id "test clone" --relativepath "test_whitespace "
error:  operation failed: PulpValidationError: Given clone_id:[test clone] is invalid. clone_id should not contain whitespace characters.
[root@preethi ~]#

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

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


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