Bug 760017

Summary: Traceback displayed while migration with invalid “installation number”
Product: Red Hat Enterprise Linux 5 Reporter: spandey
Component: subscription-managerAssignee: Alex Wood <awood>
Status: CLOSED ERRATA QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.8CC: awood, cduryee, jmolet, jsefler, kbanerje, mkhusid, skallesh, spandey, wpoteat
Target Milestone: rc   
Target Release: 5.8   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
No description necessary
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-21 06:43:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 715031, 771700, 772019    

Description spandey 2011-12-05 08:55:24 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:
3/3

Prerequisites : 
Rhel5.8 client with following subscription-manager rpm 
subscription-manager-migration-data-1.4-1.el5

subscription-manager-gnome-0.98.3-1.git.27.bd7635f.el5_7

subscription-manager-firstboot-0.98.3-1.git.27.bd7635f.el5_7

subscription-manager-migration-0.98.3-1.git.27.bd7635f.el5_7

subscription-manager-0.98.3-1.git.27.bd7635f.el5_7


Steps to Repro : 
Execute following command on console 
install-num-migrate-to-rhsm -i ahahsgsahlkjahdkgshgdhAD
install-num-migrate-to-rhsm -i 3ebe4d7b


Expected Result : 
Proper Message should display for “invalid installation number “

Actual Result : 
[root@dhcp193-182 /]# install-num-migrate-to-rhsm -i ahahsgsahlkjahdkgshgdhAD

Traceback (most recent call last):

  File "/usr/sbin/install-num-migrate-to-rhsm", line 103, in ?

    main()

  File "/usr/sbin/install-num-migrate-to-rhsm", line 79, in main

    instnum = InstallationNumber(instnumber)

  File "/usr/lib/python2.4/site-packages/instnum.py", line 61, in __init__

    raise InstallationNumberError, "Not a valid hex string"

instnum.InstallationNumberError: Not a valid hex string



[root@dhcp193-182 /]# install-num-migrate-to-rhsm -i 3ebe4d7b

Traceback (most recent call last):

  File "/usr/sbin/install-num-migrate-to-rhsm", line 103, in ?

    main()

  File "/usr/sbin/install-num-migrate-to-rhsm", line 79, in main

    instnum = InstallationNumber(instnumber)

  File "/usr/lib/python2.4/site-packages/instnum.py", line 70, in __init__

    raise InstallationNumberError, "Unsupported string length"

instnum.InstallationNumberError: Unsupported string length

Comment 1 Alex Wood 2011-12-14 20:55:08 UTC
Committed e15e66e4b3a7b24d3c0589cce0425101830b28d1

Available in 0.98.8+

Comment 2 spandey 2011-12-21 07:30:51 UTC
Verified using following rpm : 

subscription-manager-migration-data-1.7-1.el5
subscription-manager-firstboot-0.99.2-1.git.7.d4c703a.el5_7
subscription-manager-migration-0.99.2-1.git.7.d4c703a.el5_7
subscription-manager-0.99.2-1.git.7.d4c703a.el5_7
subscription-manager-gnome-0.99.2-1.git.7.d4c703a.el5_7

[root@dhcp193-29 ~]# install-num-migrate-to-rhsm -i 123456789
Could not parse the installation number: Unsupported string length
[root@dhcp193-29 ~]# install-num-migrate-to-rhsm -i 1234567
Could not parse the installation number: Unsupported string length
[root@dhcp193-29 ~]# install-num-migrate-to-rhsm -i ahahsgsahlkjahdkgshgdhAD
Could not parse the installation number: Not a valid hex string
[root@dhcp193-29 ~]# install-num-migrate-to-rhsm @@@@@@@
Could not read installation number from /etc/sysconfig/rhn/install-num.  Aborting.
[root@dhcp193-29 ~]# install-num-migrate-to-rhsm -i @@@@@@@
Could not parse the installation number: Not a valid hex string

moving defect status from Modified to verified

Comment 3 William Poteat 2012-01-23 15:36:51 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No description necessary

Comment 4 errata-xmlrpc 2012-02-21 06:43:37 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-2012-0154.html