Bug 760017 - Traceback displayed while migration with invalid “installation number”
Summary: Traceback displayed while migration with invalid “installation number”
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.8
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 5.8
Assignee: Alex Wood
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks: 715031 771700 772019
TreeView+ depends on / blocked
 
Reported: 2011-12-05 08:55 UTC by spandey
Modified: 2015-04-23 23:57 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
No description necessary
Clone Of:
Environment:
Last Closed: 2012-02-21 06:43:37 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0154 0 normal SHIPPED_LIVE subscription-manager bug fix update 2012-02-20 15:06:04 UTC

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


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