Bug 802447

Summary: Not able to bind consumers to repos with unicode id using either consumer or consumergroup bind
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: 1.1.0CC: cperry
Target Milestone: ---Keywords: Triaged
Target Release: Sprint 35   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-25 14:16:02 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:

Description Preethi Thomas 2012-03-12 15:00:43 UTC
Description of problem:
Not able to bind consumers to repos with unicode id using either consumer or consumergroup bind

Version-Release number of selected component (if applicable):

[root@preethi-el6-pulp ~]# rpm -q pulp
pulp-0.0.273-1.el6.noarch

How reproducible:


Steps to Reproduce:
1.create & sync a repo with unicode id
2.Register a consumer
3.Create a consumergroup and add the consumer to the consumergroup
4.Bind the consumergroup to the repo in step1.
5.list the repo on the consumer (notice that the repo is not listed)
6. Check pulp.repo on the consumer (notice the repo is not there)
7. Try to do consumer bind from the consumer for the same repo. (see consumer already bound message)
8. Do a consumergroup unbind.
9. Now try consumer bind
10. Unicode error

  
Actual results:
consumer not bound to the repo with unicode repoid

Expected results:
repo bound

Additional info:
 From the client.log after step 9
[root@el6-client1 ~]# pulp-consumer  -u admin -p admin consumer bind --repoid=rhel6-á2
Traceback (most recent call last):
  File "/usr/bin/pulp-consumer", line 37, in <module>
    client.main()
  File "/usr/lib/python2.6/site-packages/pulp/client/lib/cli.py", line 152, in main
    command.main(self.args[1:])
  File "/usr/lib/python2.6/site-packages/pulp/client/pluginlib/command.py", line 129, in main
    action.main(args[1:])
  File "/usr/lib/python2.6/site-packages/pulp/client/pluginlib/command.py", line 213, in main
    self.run()
  File "/usr/lib/python2.6/site-packages/pulp/client/consumer/plugins/consumer.py", line 174, in run
    self.bind_repo(repoid, bind_data)
  File "/usr/lib/python2.6/site-packages/pulp/client/consumer/plugins/consumer.py", line 193, in bind_repo
    bind_data['clientcert'])
  File "/usr/lib/python2.6/site-packages/pulp/client/lib/repolib.py", line 121, in bind
    _handle_host_urls(repo, url_list, mirror_list_filename)
  File "/usr/lib/python2.6/site-packages/pulp/client/lib/repolib.py", line 311, in _handle_host_urls
    log.info('Configuring repo [%s] to use baseurl [%s]' % (repo.id, url_list[0]))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 24: ordinal not in range(128)
[root@el6-client1 ~]#

Comment 1 Sayli Karmarkar 2012-04-26 20:27:23 UTC
Fixed.

$ pulp-consumer consumer bind --repoid Brasília 
Successfully subscribed consumer [consumer1] to repo [Brasília]

$ pulp-admin consumer bind --repoid Brasília --id consumer1
Successfully subscribed consumer [consumer1] to repo [Brasília]

$ pulp-admin consumergroup bind --id group1 --repoid Brasília
Successfully subscribed consumer group [group1] to repo [Brasília]

All the logs are clean as well.

On client - 
$ cat /etc/yum.repos.d/pulp.repo 
#
# Pulp Repositories
# Managed by Pulp client
#

[Brasília]
name = Brasília
enabled = 1
sslverify = 0
gpgcheck = 0
baseurl = https://localhost/pulp/repos/repos/pulp/pulp/dev/testing/fedora-15/x86_64

Comment 2 Jeff Ortel 2012-04-30 14:42:25 UTC
build: 1.1.6

Comment 3 Preethi Thomas 2012-05-01 19:03:14 UTC
verified

[root@pulp-v1-1-server ~]# rpm -q pulp
pulp-1.1.6-1.fc16.noarch
[root@pulp-client ~]# rpm -q pulp-consumer
pulp-consumer-1.1.6-1.el6.noarch


[root@pulp-v1-1-server ~]# pulp-admin consumergroup bind --id=grp1 --repoid=Brasília
Successfully subscribed consumer group [grp1] to repo [Brasília]



#
# Pulp Repositories
# Managed by Pulp client
#

[Brasília]
name = Brasília
enabled = 1
sslverify = 0
gpgcheck = 0
baseurl = https://pulp-v1-1-server.usersys.redhat.com/pulp/repos/repos/pulp/pulp/v1/testing/fedora-16/x86_64
[root@pulp-v1-1-server ~]# pulp-admin consumergroup ubnbind --id=grp1 --repoid=Brasília
Successfully unsubscribed consumer group [grp1] from repo [Brasília]

[root@pulp-v1-1-server ~]# pulp-admin consumer bind --id=pulp-client --repoid=Brasília
Successfully subscribed consumer [pulp-client] to repo [Brasília]

[root@pulp-v1-1-server ~]# 

#
# Pulp Repositories
# Managed by Pulp client
#

[Brasília]
name = Brasília
enabled = 1
sslverify = 0
gpgcheck = 0
baseurl = https://pulp-v1-1-server.usersys.redhat.com/pulp/repos/repos/pulp/pulp/v1/testing/fedora-16/x86_64

Comment 4 Preethi Thomas 2012-05-25 14:16:02 UTC
Pulp v1.1 Release