Bug 758471

Summary: install-num-migrate-to-rhsm throws traceback when no instnum is found
Product: Red Hat Enterprise Linux 5 Reporter: Chris Duryee <cduryee>
Component: subscription-managerAssignee: William Poteat <wpoteat>
Status: CLOSED ERRATA QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.8CC: jsefler, spandey
Target Milestone: rc   
Target Release: 5.8   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 0.98.5-1.el5 Doc Type: Bug Fix
Doc Text:
No description necessary
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-21 06:43:29 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, 769266    

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