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 704697 - Error getting subscription: %s / Serial number must be > 0
Summary: Error getting subscription: %s / Serial number must be > 0
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 6.2
Assignee: Bryan Kearney
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel62
TreeView+ depends on / blocked
 
Reported: 2011-05-14 04:38 UTC by John Sefler
Modified: 2018-11-26 17:12 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 17:14:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
circled error %s message and traceback (671.91 KB, image/png)
2011-05-14 04:48 UTC, John Sefler
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1695 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2011-12-06 01:23:29 UTC

Description John Sefler 2011-05-14 04:38:17 UTC
Description of problem:
There are two problems here, but i think one of them is already fixed by a newer version of m2crypto.  Anyway...
On an i386 provisioned box from beaker, I am getting an error when subscribing to a subscription.

Problem 1: Using the subscription-manager-gui, an error occurs when subscribing.  From the attached screenshot, the error message is not getting populated in the error dialog:
Error getting subscription: %s

The corresponding traceback is:
Traceback (most recent call last):
  File "/usr/lib/python2.4/logging/handlers.py", line 71, in emit
    if self.shouldRollover(record):
  File "/usr/lib/python2.4/logging/handlers.py", line 149, in shouldRollover
    msg = "%s\n" % self.format(record)
  File "/usr/lib/python2.4/logging/__init__.py", line 617, in format
    return fmt.format(record)
  File "/usr/lib/python2.4/logging/__init__.py", line 405, in format
    record.message = record.getMessage()
  File "/usr/lib/python2.4/logging/__init__.py", line 272, in getMessage
    msg = str(self.msg)
TypeError: __str__ returned non-string (type NoneType)


Problem 2: Using the command line tool, you will also see an error when subscribing...

[root@dell-pe2550-01 ~]# subscription-manager list --avail
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+


ProductName:       	Red Hat Employee Subscription
ProductId:         	SYS0395                  
PoolId:            	8a85f9812ede00af012edf01c89f5cf9
Quantity:          	9993                     
Expires:           	10/07/2011               

[root@dell-pe2550-01 ~]# subscription-manager subscribe --pool=8a85f9812ede00af012edf01c89f5cf9
Entitlement Certificate(s) update failed due to the following reasons:
	- Serial number must be > 0
	- Serial number must be > 0


Version-Release number of selected component (if applicable):
Verifying Version on i686...
[root@dell-pe2550-01 ~]# rpm -qa | grep subscription-manager
subscription-manager-0.95.5.15-1.el5
subscription-manager-gnome-0.95.5.15-1.el5
subscription-manager-firstboot-0.95.5.15-1.el5

[root@dell-pe2550-01 ~]# subscription-manager facts --list | grep uname
uname.machine: i686
uname.nodename: dell-pe2550-01.rhts.eng.bos.redhat.com
uname.release: 2.6.18-259.el5
uname.sysname: Linux
uname.version: #1 SMP Fri Apr 29 01:10:46 EDT 2011

[root@dell-pe2550-01 ~]# rpm -q m2crypto
m2crypto-0.16-7.el5


I suspect a newer version of m2crypto will fix the subscribe errors.  However, it may avoid the problem of the error string not getting populated in the error message dialog:  
  Error getting subscription: %s

PS. I don't think the i386 arch is a factor in this bugzilla.

Comment 1 John Sefler 2011-05-14 04:48:34 UTC
Created attachment 498900 [details]
circled error %s message and traceback

Comment 2 John Sefler 2011-05-14 04:55:00 UTC
yes - installing newer m2crypto fixed the command line subscribe...

[root@dell-pe2550-01 ~]# rpm -q m2crypto
m2crypto-0.16-8.el5
[root@dell-pe2550-01 ~]# subscription-manager unsubscribe --all[root@dell-pe2550-01 ~]# subscription-manager subscribe --pool=8a85f9812ede00af012edf01c89f5cf9
[root@dell-pe2550-01 ~]# 


In fact,the error messages string "Error getting subscription: %s" is indeed avoided in the subscription-manager-gui with the newer version of m2crypto.

Therefore we could use a fix for problem 1 and to test it, we need to install  m2crypto-0.16-7.el5 and NOT a newer version of it.

Comment 4 Chris Duryee 2011-08-15 18:32:23 UTC
John,

I tested this with subscription-manager 700098a master and python-rhsm d42033a master. I then altered python-rhsm to make the "Serial number must be > 0" error happen every time.

However, I was unable to reproduce the issue described in the bug (the %s message in sm-gui). Marking as MODIFIED since I'm assuming this was fixed via some other bugfix. Let me know if you need any help reproducing the issue.

Comment 5 J.C. Molet 2011-08-16 17:33:36 UTC
I cannot reproduce this bug on any system.  I am marking it verified as it seems to be a non issue as of:

subscription-manager-0.96.5-1.git.51.ac50478.el6.x86_64
subscription-manager-firstboot-0.96.5-1.git.51.ac50478.el6.x86_64
python-rhsm-0.96.8-1.git.5.d42033a.el6.noarch
subscription-manager-gnome-0.96.5-1.git.51.ac50478.el6.x86_64

Comment 6 errata-xmlrpc 2011-12-06 17:14:16 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-2011-1695.html


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