Bug 790838 - Sync fails if the repo was created with space in id
Summary: Sync fails if the repo was created with space in id
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Sayli Karmarkar
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-15 14:16 UTC by Preethi Thomas
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)
pulp.log (2.89 KB, text/plain)
2012-02-15 14:16 UTC, Preethi Thomas
no flags Details

Description Preethi Thomas 2012-02-15 14:16:15 UTC
Created attachment 562229 [details]
pulp.log

Description of problem:

If I create a repo with spaces in the id, repo create is successful but sync fails.

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


How reproducible:


Steps to Reproduce:
1.Create a repo with spaces in id
2. Try to sync the repo
3.
  
Actual results:

Traceback

Expected results:

Either repo should sync or it should not let you create repo with spaces in id.


Additional info:

[root@preethi ~]# pulp-admin repo create --id="test repo" --feed=https://preethi.usersys.redhat.com/pulp/repos/repos/pulp/pulp/testing/5Server/x86_64/ --relativepath=testrepo
Successfully created repository [ test repo ]
[root@preethi ~]# pulp-admin repo sync --id="test repo" -F
Sync for repository test repo started
Sync: Error

Item Details: 
error:  Exception: Traceback (most recent call last):

  File "/usr/lib/python2.7/site-packages/grinder/activeobject.py", line 429, in process
    retval = method(*args, **kwargs)

  File "/usr/lib/python2.7/site-packages/grinder/RepoFetch.py", line 51, in fetchItem
    verify_options=self.verify_options)

  File "/usr/lib/python2.7/site-packages/grinder/BaseFetch.py", line 328, in fetch
    checksum, headers, retryTimes, packages_location)

  File "/usr/lib/python2.7/site-packages/grinder/BaseFetch.py", line 328, in fetch
    checksum, headers, retryTimes, packages_location)

  File "/usr/lib/python2.7/site-packages/grinder/BaseFetch.py", line 270, in fetch
    curl.perform()

error: (60, 'Peer certificate cannot be authenticated with known CA certificates')

Comment 1 Sayli Karmarkar 2012-02-15 20:02:57 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 create --id "test   whitespace"
error:  operation failed: PulpValidationError: Given ID:[test   whitespace] is
invalid. ID should not contain whitespace characters.

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

Comment 3 Preethi Thomas 2012-02-17 17:54:24 UTC
verified

[root@preethi ~]# pulp-admin repo create --id="test repo" --feed=http://repos.fedorapeople.org/repos/pulp/pulp/v1/testing/fedora-16/x86_64/
error:  operation failed: PulpValidationError: Given ID:[test repo] is invalid. ID should not contain whitespace characters.
[root@preethi ~]# 
[root@preethi ~]# 
[root@preethi ~]# rpm -q pulp
pulp-0.0.267-1.fc15.noarch
[root@preethi ~]#

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

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


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