Bug 683486

Summary: repo create with unicode for id errors out. but still creates the id
Product: [Retired] Pulp Reporter: Preethi Thomas <pthomas>
Component: z_otherAssignee: Sayli Karmarkar <skarmark>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: cperry, skarmark
Target Milestone: ---Keywords: Triaged
Target Release: Sprint 24   
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:09:36 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: 647488    

Description Preethi Thomas 2011-03-09 14:47:21 UTC
Description of problem:

1. Create a repo with --id=Příl
2 operation failed
3. Run the command again you get repo already exist
4. Run repo list. See it fails as well


[root@preethi ~]# rpm -q pulp
pulp-0.0.146-1.fc14.noarch

[root@preethi ~]# pulp-admin repo create --arch=x86_64 --feed yum:http://download.fedora.redhat.com/pub/fedora/linux/updates/13/x86_64/ --name="unicode-id" --id=Příl
error: operation failed: 



2011-03-09 09:52:47,017 [ERROR][Dummy-2] report_error() @ base.py:56 - Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/base.py", line 52, in report_error
    return method(self, *args, **kwargs)
  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/webservices/controllers/base.py", line 131, in _auth_decorator
    value = method(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/repositories.py", line 109, in POST
    path = http.extend_uri_path(repo["id"])
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/http.py", line 233, in extend_uri_path
    suffix = urllib.pathname2url(suffix)
  File "/usr/lib64/python2.7/urllib.py", line 58, in pathname2url
    return quote(pathname)
  File "/usr/lib64/python2.7/urllib.py", line 1231, in quote
    return ''.join(map(quoter, s))
KeyError: u'\u0159'



[root@preethi ~]# pulp-admin repo create --arch=x86_64 --feed yum:http://download.fedora.redhat.com/pub/fedora/linux/updates/13/x86_64/ --name="unicodeid" --id=Příl
error: operation failed: A repository with the id, Příl, already exists




[root@preethi ~]# pulp-admin repo list
error: operation failed: 



2011-03-09 09:53:42,522 [ERROR][Dummy-2] report_error() @ base.py:56 - Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/base.py", line 52, in report_error
    return method(self, *args, **kwargs)
  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/webservices/controllers/base.py", line 131, in _auth_decorator
    value = method(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/repositories.py", line 76, in GET
    repo['uri_ref'] = http.extend_uri_path(repo['id'])
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/http.py", line 233, in extend_uri_path
    suffix = urllib.pathname2url(suffix)
  File "/usr/lib64/python2.7/urllib.py", line 58, in pathname2url
    return quote(pathname)
  File "/usr/lib64/python2.7/urllib.py", line 1231, in quote

Comment 1 Sayli Karmarkar 2011-05-18 06:54:21 UTC
This is fixed as part of ID consistency changes:

$ sudo pulp-admin repo create --arch=x86_64 --feed http://download.fedora.redhat.com/pub/fedora/linux/updates/13/x86_64/ --id=Příl
error: operation failed: PulpException: 'Given ID is invalid. ID may contain numbers(0-9), upper and lower case letters(A-Z, a-z), hyphens(-), underscore(_) and periods(.)'

Comment 2 Jeff Ortel 2011-05-18 21:07:02 UTC
build: 0.178

Comment 3 Preethi Thomas 2011-05-24 19:37:49 UTC
verified
[root@preethi unit]# rpm -q pulp
pulp-0.0.179-1.fc14.noarch

[root@preethi unit]# sudo pulp-admin repo create --arch=x86_64 --feed=http://download.fedora.redhat.com/pub/fedora/linux/updates/13/x86_64/ --id=Příl
error: operation failed: PulpException: 'Given ID is invalid. ID may contain numbers(0-9), upper and lower case letters(A-Z, a-z), hyphens(-), underscore(_) and periods(.)'

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

pulp-0.0.223-4.

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

pulp-0.0.223-4.