This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 704697 - Error getting subscription: %s / Serial number must be > 0
Error getting subscription: %s / Serial number must be > 0
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager (Show other bugs)
6.2
Unspecified Unspecified
unspecified Severity unspecified
: rc
: 6.2
Assigned To: Bryan Kearney
John Sefler
:
Depends On:
Blocks: rhsm-rhel62
  Show dependency treegraph
 
Reported: 2011-05-14 00:38 EDT by John Sefler
Modified: 2012-02-29 03:50 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-12-06 12:14:16 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description John Sefler 2011-05-14 00:38:17 EDT
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 00:48:34 EDT
Created attachment 498900 [details]
circled error %s message and traceback
Comment 2 John Sefler 2011-05-14 00:55:00 EDT
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 14:32:23 EDT
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 13:33:36 EDT
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 12:14:16 EST
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.