Bug 802447 - Not able to bind consumers to repos with unicode id using either consumer or consumergroup bind
Not able to bind consumers to repos with unicode id using either consumer or ...
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: z_other (Show other bugs)
1.1.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: Sprint 35
Assigned To: Sayli Karmarkar
Preethi Thomas
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-12 11:00 EDT by Preethi Thomas
Modified: 2015-03-22 21:11 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-25 10:16:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Preethi Thomas 2012-03-12 11:00:43 EDT
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 16:27:23 EDT
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 10:42:25 EDT
build: 1.1.6
Comment 3 Preethi Thomas 2012-05-01 15:03:14 EDT
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 10:16:02 EDT
Pulp v1.1 Release

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