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 800323 - Unicode characters break subscription-manager when executed from a subshell
Summary: Unicode characters break subscription-manager when executed from a subshell
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Alex Wood
QA Contact: Entitlement Bugs
URL:
Whiteboard:
Depends On:
Blocks: 771481 888457
TreeView+ depends on / blocked
 
Reported: 2012-03-06 10:13 UTC by Tomas Strachota
Modified: 2013-05-28 15:10 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 08:54:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Setting default output stream encoding to utf-8 (1011 bytes, patch)
2012-03-15 15:28 UTC, Tomas Strachota
no flags Details | Diff
Encoding of url params (1.11 KB, patch)
2012-03-15 15:30 UTC, Tomas Strachota
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0350 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2013-02-20 20:53:35 UTC

Description Tomas Strachota 2012-03-06 10:13:29 UTC
Description of problem:

Any subscription-manager action that is run against a system with orgs and envs containing international characters fails. It's most likely caused by Python's output encoding that set to 'ascii' by default.


Version-Release number of selected component (if applicable):
subscription-manager-0.96.17-1
candlepin-0.5.20-1


Steps to Reproduce:
1. install katello, create org and env with international chars
2. set subscription-manager against that server
3. echo "$(subscription-manager orgs --username=admin --password=admin)"


Actual results:
'ascii' codec can't encode character u'\u017e' in position XXX: ordinal not in range(128)

Expected results:
It should print data normally.

Comment 2 Bryan Kearney 2012-03-07 20:01:33 UTC
This is fixed in the latest subscription-manager. No change was required when using 0.99.X. QA, can you verify?

Comment 3 Tomas Strachota 2012-03-15 15:28:10 UTC
Created attachment 570325 [details]
Setting default output stream encoding to utf-8

It is still not working in our katello system tests with the latest version of subscription-manager. I have two patches that fixed the problem for me.

Comment 4 Tomas Strachota 2012-03-15 15:30:59 UTC
Created attachment 570326 [details]
Encoding of url params

A patch for python-rhsm that fixes using i18n names in url params. Probably not the cleanest one.

Comment 6 Alex Wood 2012-12-05 20:13:47 UTC
Tomas,

I was able to reproduce the error you are receiving when running a command in a subshell.  The patch provided in comment 3 does fix the issue for me.

However, I'm wondering about the patch in comment 4.  Can you give me a scenario to test it with?

I tried the following, but everything worked correctly.

  1. Create organization in Katello with international characters in the name.
  2. Create an environment for that organization.
  3. Run subscription-manager environments --org=$name_from_step_1

Comment 7 Alex Wood 2012-12-06 18:06:00 UTC
commit 056e69dc833919709bbf23d8a7b73a5345f77fdf
Author: Alex Wood <awood>
Date:   Wed Dec 5 15:46:57 2012 -0500

    800323: Set default output stream encoding to UTF-8.

Comment 10 John Sefler 2012-12-12 20:28:38 UTC
Verifying Version...
[root@jsefler-6 ~]# rpm -q subscription-manager
subscription-manager-1.1.14-1.el6.x86_64
CloudForms System Engine Version: 1.1.12-22.el6cf 

After configuring my system to communicate with CFSE, and creating a organization and environment on the CDSE, I can now use subscription-manager to query the availablilty of orgs and envs as follows...


[root@jsefler-6 ~]# subscription-manager orgs --username=admin
Password: 
+-------------------------------------------+
          admin Organizations
+-------------------------------------------+

Name: 	項目
Key: 	orglabel

Name: 	ACME_Corporation
Key: 	ACME_Corporation

[root@jsefler-6 ~]# subscription-manager environments --username=admin --org=項目
Password: 
+-------------------------------------------+
          Environments
+-------------------------------------------+
Name:                 	理者
Description:        


^^^ VERIFIED: The international characters used for an organization name and an environment name where properly displayed in the subscription-manager output.

Moving bugzilla status to VERIFIED

Comment 12 errata-xmlrpc 2013-02-21 08:54:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0350.html

Comment 13 John Sefler 2013-05-28 15:10:44 UTC
Note: The subject of this bug has been re-visited for subscription-manager-1.8 in bug 919584
See https://bugzilla.redhat.com/show_bug.cgi?id=919584#c7


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