RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 906000 - UnicodeDecodeError traceback when registering to an org containing international chars
Summary: UnicodeDecodeError traceback when registering to an org containing internatio...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Alex Wood
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel70
TreeView+ depends on / blocked
 
Reported: 2013-01-30 15:28 UTC by John Sefler
Modified: 2013-02-15 17:03 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-15 17:03:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description John Sefler 2013-01-30 15:28:16 UTC
Description of problem:


Version-Release number of selected component (if applicable):
[root@jsefler-7 ~]# rpm -q subscription-manager python
subscription-manager-1.8.1-1.git.2.23579a5.el7.x86_64
python-2.7.3-13.el7.x86_64


How reproducible:


Steps to Reproduce:
[root@jsefler-7 ~]# subscription-manager register --username=testuser1 --org="富 酒吧"
Password: 
Traceback (most recent call last):
  File "/usr/lib64/python2.7/logging/handlers.py", line 77, in emit
    if self.shouldRollover(record):
  File "/usr/lib64/python2.7/logging/handlers.py", line 156, in shouldRollover
    msg = "%s\n" % self.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 723, in format
    return fmt.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 467, in format
    s = self._fmt % record.__dict__
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 13: ordinal not in range(128)
Logged from file managercli.py, line 1045
Organization 富 酒吧 does not exist.

  
Actual results:
above


Expected results:
expect the same resulst as a rhel6 subscription-manager...
[root@jsefler-6 ~]# subscription-manager register --username=testuser1 --org="富 酒吧"
Password: 
Organization 富 酒吧 does not exist.


Additional info:
[root@jsefler-7 ~]# tail -f /var/log/rhsm/rhsm.log
2013-01-30 10:22:30,844 [DEBUG]  @profile.py:95 - Loading current RPM profile.
2013-01-30 10:22:30,973 [INFO]  @managercli.py:291 - Client Versions: {'python-rhsm': '1.8.1-1.git.1.e5c1539.el7', 'subscription-manager': '1.8.1-1.git.2.23579a5.el7'} 
2013-01-30 10:22:30,975 [INFO]  @connection.py:587 - Using certificate authentication: key = /etc/pki/consumer/key.pem, cert = /etc/pki/consumer/cert.pem, ca = /etc/rhsm/ca/, insecure = False
2013-01-30 10:22:30,975 [INFO]  @connection.py:598 - Connection Built: host: jsefler-f14-candlepin.usersys.redhat.com, port: 8443, handler: /candlepin
2013-01-30 10:22:30,976 [INFO]  @connection.py:594 - Using no auth
2013-01-30 10:22:30,977 [INFO]  @connection.py:598 - Connection Built: host: jsefler-f14-candlepin.usersys.redhat.com, port: 8443, handler: /candlepin
2013-01-30 10:22:30,978 [DEBUG]  @connection.py:394 - Loading CA PEM certificates from: /etc/rhsm/ca/
2013-01-30 10:22:30,979 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2013-01-30 10:22:30,980 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2013-01-30 10:22:30,981 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/jsefler-f14-7candlepin.pem'
2013-01-30 10:22:30,982 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/jsefler-f14-candlepin.pem'
2013-01-30 10:22:30,982 [DEBUG]  @connection.py:415 - Making request: GET /candlepin/
2013-01-30 10:22:31,079 [DEBUG]  @connection.py:435 - Response status: 200
2013-01-30 10:22:31,081 [DEBUG]  @connection.py:614 - Server supports the following resources:
2013-01-30 10:22:31,082 [DEBUG]  @connection.py:615 - {'': '/', 'hypervisors': '/hypervisors', 'serials': '/serials', 'consumers': '/consumers', 'migrations': '/migrations', 'content': '/content', 'entitlements': '/entitlements', 'statistics/generate': '/statistics/generate', 'status': '/status', 'jobs': '/jobs', 'users': '/users', 'subscriptions': '/subscriptions', 'rules': '/rules', 'consumertypes': '/consumertypes', 'activation_keys': '/activation_keys', 'atom': '/atom', 'owners': '/owners', 'roles': '/roles', 'admin': '/admin', 'events': '/events', 'products': '/products', 'pools': '/pools', 'crl': '/crl'}
2013-01-30 10:22:31,084 [DEBUG]  @connection.py:394 - Loading CA PEM certificates from: /etc/rhsm/ca/
2013-01-30 10:22:31,085 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2013-01-30 10:22:31,086 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2013-01-30 10:22:31,089 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/jsefler-f14-7candlepin.pem'
2013-01-30 10:22:31,094 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/jsefler-f14-candlepin.pem'
2013-01-30 10:22:31,097 [DEBUG]  @connection.py:415 - Making request: GET /candlepin/status
2013-01-30 10:22:31,123 [DEBUG]  @connection.py:435 - Response status: 200
2013-01-30 10:22:31,132 [DEBUG]  @connection.py:394 - Loading CA PEM certificates from: /etc/rhsm/ca/
2013-01-30 10:22:31,134 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2013-01-30 10:22:31,135 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2013-01-30 10:22:31,137 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/jsefler-f14-7candlepin.pem'
2013-01-30 10:22:31,139 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/jsefler-f14-candlepin.pem'
2013-01-30 10:22:31,140 [DEBUG]  @connection.py:415 - Making request: GET /candlepin/status
2013-01-30 10:22:31,167 [DEBUG]  @connection.py:435 - Response status: 200
2013-01-30 10:22:31,170 [INFO]  @managercli.py:302 - Server Versions: {'candlepin': '0.7.24-1', 'server-type': 'This system is currently not registered.'} 
2013-01-30 10:22:31,173 [INFO]  @managercli.py:291 - Client Versions: {'python-rhsm': '1.8.1-1.git.1.e5c1539.el7', 'subscription-manager': '1.8.1-1.git.2.23579a5.el7'} 
2013-01-30 10:22:36,452 [INFO]  @connection.py:576 - Using basic authentication as: testuser1
2013-01-30 10:22:36,452 [INFO]  @connection.py:598 - Connection Built: host: jsefler-f14-candlepin.usersys.redhat.com, port: 8443, handler: /candlepin
2013-01-30 10:22:36,664 [DEBUG]  @cert_sorter.py:116 - Sorting product and entitlement cert status for: 2013-01-30 15:22:36.663838+00:00
2013-01-30 10:22:36,667 [DEBUG]  @cert_sorter.py:169 - Installed product IDs: ['99000']
2013-01-30 10:22:36,667 [DEBUG]  @cert_sorter.py:122 - valid entitled products: []
2013-01-30 10:22:36,667 [DEBUG]  @cert_sorter.py:123 - expired entitled products: []
2013-01-30 10:22:36,668 [DEBUG]  @cert_sorter.py:124 - partially entitled products: []
2013-01-30 10:22:36,668 [DEBUG]  @cert_sorter.py:125 - unentitled products: ['99000']
2013-01-30 10:22:36,668 [DEBUG]  @cert_sorter.py:126 - future products: []
2013-01-30 10:22:36,668 [DEBUG]  @cert_sorter.py:127 - partial stacks: []
2013-01-30 10:22:36,668 [DEBUG]  @cert_sorter.py:128 - valid stacks: []
2013-01-30 10:22:36,669 [DEBUG]  @connection.py:394 - Loading CA PEM certificates from: /etc/rhsm/ca/
2013-01-30 10:22:36,670 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2013-01-30 10:22:36,670 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2013-01-30 10:22:36,671 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/jsefler-f14-7candlepin.pem'
2013-01-30 10:22:36,671 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/jsefler-f14-candlepin.pem'
2013-01-30 10:22:36,672 [DEBUG]  @connection.py:415 - Making request: POST /candlepin/consumers?owner=%E5%AF%8C+%E9%85%92%E5%90%A7
2013-01-30 10:22:36,769 [DEBUG]  @connection.py:435 - Response status: 400

Comment 2 John Sefler 2013-01-30 21:59:11 UTC
Here's another occurance of the same traceback using activationkey names with international chars...

[root@jsefler-7 ~]# subscription-manager register --force --org=admin --activationkey="使 용 Ф ব্ ಬ ഉ ବ୍ டு వా Й Ó"
The system with UUID 8ee7eeb9-6bc3-4091-9f29-4a0aa2a4686f has been unregistered
Traceback (most recent call last):
  File "/usr/lib64/python2.7/logging/handlers.py", line 77, in emit
    if self.shouldRollover(record):
  File "/usr/lib64/python2.7/logging/handlers.py", line 156, in shouldRollover
    msg = "%s\n" % self.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 723, in format
    return fmt.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 467, in format
    s = self._fmt % record.__dict__
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 16: ordinal not in range(128)
Logged from file managercli.py, line 1045
Activation key '使 용 Ф ব্ ಬ ഉ ବ୍ டு వా Й Ó' not found for organization 'admin'.

Comment 3 Alex Wood 2013-02-14 21:03:33 UTC
I can't replicate this with subscription-manager-1.8.2-1.el7.x86_64.  Can you please try the latest RHEL 7 nightly and test again?

Comment 4 John Sefler 2013-02-15 17:03:56 UTC
(In reply to comment #3)
> I can't replicate this with subscription-manager-1.8.2-1.el7.x86_64.  Can
> you please try the latest RHEL 7 nightly and test again?

Agreed. I also cannot reproduce with a newer subscription-manager...

[root@jsefler-7 ~]# rpm -q subscription-manager
subscription-manager-1.8.2-1.git.20.c213b88.el7.x86_64
[root@jsefler-7 ~]# subscription-manager register --username=testuser1 --org="富 酒吧"
Password: 
Organization 富 酒吧 does not exist.
[root@jsefler-7 ~]# subscription-manager register --force --org=admin --activationkey="使 용 Ф ব্ ಬ ഉ ବ୍ டு వా Й Ó"
Activation key '使 용 Ф ব্ ಬ ഉ ବ୍ டு వా Й Ó' not found for organization 'admin'.
[root@jsefler-7 ~]# 


Moving STATUS to CLOSED.


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