Bug 683486 - repo create with unicode for id errors out. but still creates the id
Summary: repo create with unicode for id errors out. but still creates the id
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 24
Assignee: Sayli Karmarkar
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: verified-to-close
TreeView+ depends on / blocked
 
Reported: 2011-03-09 14:47 UTC by Preethi Thomas
Modified: 2015-03-23 01:10 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-08-16 12:09:36 UTC
Embargoed:


Attachments (Terms of Use)

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.


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