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 889204 - encountering the following stderr msg when subscription name contains UTF8 chars: [priority,] message string
Summary: encountering the following stderr msg when subscription name contains UTF8 ch...
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: Bryan Kearney
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks: 771481 rhsm-rhel70
TreeView+ depends on / blocked
 
Reported: 2012-12-20 13:53 UTC by John Sefler
Modified: 2020-10-07 22:37 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 09:05:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


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 John Sefler 2012-12-20 13:53:32 UTC
Description of problem:
As a follow-up to bug 880070 I encounter a stderr with message "[priority,] message string" when attaching/removing a subscription whose name contains UTF8 characters.

Version-Release number of selected component (if applicable):
[root@jsefler-6 ~]# rpm -q subscription-manager
subscription-manager-1.1.18-1.el6.x86_64

How reproducible:


Steps to Reproduce:
1. create a subscription with a name containing UTF8 characters, then...


[root@jsefler-6 ~]# subscription-manager list --avail
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name:    	Subscription name containing UTF–8 character \u2013
SKU:                  	utf8-subscription-sku
Pool Id:              	8a90f82e3bb5d7f1013bb87afd3c3d9d
Quantity:             	20
Service Level:        	
Service Type:         	
Multi-Entitlement:    	No
Ends:                 	01/04/2013
System Type:          	Physical

[root@jsefler-6 ~]# subscription-manager subscribe --pool 8a90f82e3bb5d7f1013bb87afd3c3d9d
Successfully attached a subscription for: Subscription name containing UTF–8 character \u2013
[priority,] message string                <=============================== BANG!

[root@jsefler-6 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+

Subscription Name:    	Subscription name containing UTF–8 character \u2013
Provides:             	
SKU:                  	utf8-subscription-sku
Contract:             	98943705
Account:              	1781079502
Serial Number:        	9044721319435475545
Active:               	True
Quantity Used:        	1
Service Level:        	
Service Type:         	
Starts:               	12/19/2012
Ends:                 	01/04/2013

[root@jsefler-6 ~]# subscription-manager unsubscribe --serial 9044721319435475545
Successfully removed serial numbers:
   9044721319435475545
[priority,] message string                <=============================== BANG!

[root@jsefler-6 ~]# subscription-manager subscribe --pool 8a90f82e3bb5d7f1013bb87afd3c3d9d
Successfully attached a subscription for: Subscription name containing UTF–8 character \u2013
[priority,] message string                <=============================== BANG!

[root@jsefler-6 ~]# subscription-manager unsubscribe --all
1 subscription removed from this system.
[priority,] message string                <=============================== BANG!

[root@jsefler-6 ~]# echo $?
255




  
Actual results:
above

Expected results:
should not encounter the stderr messages "[priority,] message string"




Additional info:
[root@jsefler-6 ~]# tail -f /var/log/rhsm/rhsm.log

2012-12-20 08:48:55,307 [ERROR]  @managercli.py:115 - Unable to attach: [priority,] message string
2012-12-20 08:48:55,308 [ERROR]  @managercli.py:116 - [priority,] message string
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 1355, in _do_command
    result = self.certlib.update()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 61, in update
    return self._do_update()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 84, in _do_update
    return action.perform()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 226, in perform
    self.syslogResults(report)
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 252, in syslogResults
    (cert.order.name, cert.order.contract))
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 40, in system_log
    syslog.syslog(priority, message)
TypeError: [priority,] message string


2012-12-20 08:50:04,445 [ERROR]  @managercli.py:115 - Unable to perform remove due to the following exception: [priority,] message string
2012-12-20 08:50:04,445 [ERROR]  @managercli.py:116 - [priority,] message string
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 1471, in _do_command
    self.certlib.update()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 61, in update
    return self._do_update()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 84, in _do_update
    return action.perform()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 226, in perform
    self.syslogResults(report)
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 258, in syslogResults
    (cert.order.name, cert.order.contract))
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 40, in system_log
    syslog.syslog(priority, message)
TypeError: [priority,] message string

Comment 1 RHEL Program Management 2012-12-24 06:53:25 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 2 Bryan Kearney 2013-01-02 19:51:34 UTC
Fixed in master at https://github.com/candlepin/subscription-manager/pull/471

Comment 3 Bryan Kearney 2013-01-04 16:37:14 UTC
commit 8da0f99018371c754aea5a87b2d1eb8eb0ccc4df
Author: Bryan Kearney <bkearney>
Date:   Wed Jan 2 14:49:05 2013 -0500

    889204: Encode the unicode string to utf-8 to avoid syslog errors

Comment 4 John Sefler 2013-01-04 18:14:59 UTC
also see similar bug 890296

Comment 6 John Sefler 2013-01-07 22:30:08 UTC
Verifying Version...
[root@jsefler-6 ~]# rpm -q subscription-manager
subscription-manager-1.1.19-1.el6.x86_64


[root@jsefler-6 ~]# subscription-manager list --avail
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name:    	Subscription name containing UTF–8 character \u2013
SKU:                  	utf8-subscription-sku
Pool Id:              	8a90f81d3c159143013c16fd0baa0cb9
Quantity:             	20
Service Level:        	
Service Type:         	
Multi-Entitlement:    	No
Ends:                 	01/22/2013
System Type:          	Physical

[root@jsefler-6 ~]# subscription-manager subscribe --pool 8a90f81d3c159143013c16fd0baa0cb9
Successfully attached a subscription for: Subscription name containing UTF–8 character \u2013
[root@jsefler-6 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+

Subscription Name:    	Subscription name containing UTF–8 character \u2013
Provides:             	
SKU:                  	utf8-subscription-sku
Contract:             	1554692394
Account:              	237306038
Serial Number:        	8286469716699169978
Active:               	True
Quantity Used:        	1
Service Level:        	
Service Type:         	
Starts:               	01/06/2013
Ends:                 	01/22/2013

[root@jsefler-6 ~]# rct cat-cert /etc/pki/entitlement/8286469716699169978.pem 

+-------------------------------------------+
	Entitlement Certificate
+-------------------------------------------+

Certificate:
	Path: /etc/pki/entitlement/8286469716699169978.pem
	Version: 3.1
	Serial: 8286469716699169978
	Start Date: 2013-01-06 21:49:06+00:00
	End Date: 2013-01-22 21:49:06+00:00

Subject:
	CN: 8a90f81d3c159143013c171cf5470ce1


Order:
	Name: Subscription name containing UTF–8 character \u2013
	Number: 8a90f81d3c159143013c16fd06f50cb7
	SKU: utf8-subscription-sku
	Contract: 1554692394
	Account: 237306038
	Service Level: 
	Service Type: 
	Quantity: 20
	Quantity Used: 1
	Socket Limit: 
	RAM Limit: 
	Virt Limit: 
	Virt Only: False
	Subscription: 
	Stacking ID: 
	Warning Period: 0
	Provides Management: False

[root@jsefler-6 ~]# subscription-manager unsubscribe --serial 8286469716699169978
Successfully removed serial numbers:
   8286469716699169978
[root@jsefler-6 ~]# subscription-manager subscribe --pool 8a90f81d3c159143013c16fd0baa0cb9
Successfully attached a subscription for: Subscription name containing UTF–8 character \u2013
[root@jsefler-6 ~]# subscription-manager unsubscribe --all
1 subscription removed from this system.
[root@jsefler-6 ~]# echo $?
0


VERIFIED: The subscription-manager calls above no longer throw "TypeError: [priority,] message string" to stderr when encountering an entitlement whose subscription name contains UTF8 characters

Comment 8 errata-xmlrpc 2013-02-21 09:05:53 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


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