Bug 758471 - install-num-migrate-to-rhsm throws traceback when no instnum is found
Summary: install-num-migrate-to-rhsm throws traceback when no instnum is found
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
unspecified
unspecified
Target Milestone: rc
: 5.8
Assignee: William Poteat
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks: 715031 769266
TreeView+ depends on / blocked
 
Reported: 2011-11-29 21:33 UTC by Chris Duryee
Modified: 2012-02-21 06:43 UTC (History)
2 users (show)

Fixed In Version: 0.98.5-1.el5
Doc Type: Bug Fix
Doc Text:
No description necessary
Clone Of:
Environment:
Last Closed: 2012-02-21 06:43:29 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 Chris Duryee 2011-11-29 21:33:33 UTC
Description of problem:

Running install-num-migrate-to-rhsm on a system without an install number produces a traceback:

[root@localhost yum.repos.d]# install-num-migrate-to-rhsm
Traceback (most recent call last):
  File "/usr/sbin/install-num-migrate-to-rhsm", line 59, in ?
    f = open('/etc/sysconfig/rhn/install-num', 'r')
IOError: [Errno 2] No such file or directory: '/etc/sysconfig/rhn/install-num'

It should display a more user-friendly message and quit with a nonzero exit code.

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

subscription-manager-migration-0.98.3-1.el5


Steps to Reproduce:
1. install a system without using an instnum, or delete /etc/sysconfig/rhn/install-num
2. run install-num-migrate-to-rhsm

Comment 1 Chris Duryee 2011-12-05 14:14:43 UTC
7df8f866c9ee0 0.98.4+

Comment 3 spandey 2011-12-12 13:48:46 UTC
verified using following rpm 

[root@localhost ~]# rpm -qa | grep subscription-manager
subscription-manager-gnome-0.98.7-1.git.1.c08872a.el5_7
subscription-manager-firstboot-0.98.7-1.git.1.c08872a.el5_7
subscription-manager-migration-0.98.7-1.git.1.c08872a.el5_7
subscription-manager-0.98.7-1.git.1.c08872a.el5_7

[root@localhost ~]# install-num-migrate-to-rhsm 
Could not read installation number from /etc/sysconfig/rhn/install-num.  Aborting.


Working fine resolving defect as verified.

Comment 4 William Poteat 2012-01-23 15:31:34 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 5 errata-xmlrpc 2012-02-21 06:43:29 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.