Bug 749332 - subscription-manager returns different error messages for same issue
Summary: subscription-manager returns different error messages for same issue
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
low
Target Milestone: rc
: 5.8
Assignee: Bryan Kearney
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks: 715031 769266
TreeView+ depends on / blocked
 
Reported: 2011-10-26 18:13 UTC by Eric Sammons
Modified: 2013-01-10 10:57 UTC (History)
6 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:42:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Very simple patch, minimal testing conducted. Could still use a new line for neatness. (2.13 KB, patch)
2011-10-26 18:31 UTC, Eric Sammons
no flags Details | Diff


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 Eric Sammons 2011-10-26 18:13:59 UTC
Description of problem:
When attempting to execute a task with subscription-manager on a unregistered system, different tasks may trigger different errors for the exact same issue; Unregistered system.

Version-Release number of selected component (if applicable):
subscription-manager-0.96.12-1.el6.x86_64

How reproducible:
Everytime


Steps to Reproduce:
1. Run a couple of commands on a system that is unregistered, for example.
# subscription-manager refresh
Error: You need to register this system by running `register` command before using this option.
# subscription-manager redeem
Error: You need to register this system by running `register` command before using this option.
2. Run the following command and note the result, same meaning but different message.
# subscription-manager identity
Consumer not registered. Please register using --username and --password


Expected results:
For a system that is unregistered, the error message should be consistent indicating that the machine is unregistered and perhaps a possible solution, similar to no. 1 above.

Additional info:
I have attached a simple patch; however, I believe this space could still be cleaned up, as is the error is multi-line should include \n.  I have done minimal testing with this patch.

Comment 1 John Sefler 2011-10-26 18:28:13 UTC
Moreover these error messages should be consistently written to stderr with exitCode 255

Comment 2 Eric Sammons 2011-10-26 18:31:01 UTC
Created attachment 530354 [details]
Very simple patch, minimal testing conducted.  Could still use a new line for neatness.

Comment 3 Eric Sammons 2011-10-26 18:32:17 UTC
patch could easily be modified to change sys.exit(-1) to sys.exit(255).

Comment 7 Shwetha Kallesh 2011-11-24 07:18:48 UTC
Moving the bug to verified..

RPM used:

[root@tiger ~]# rpm -qa | grep subscription-manager
subscription-manager-gnome-0.98.3-1.git.16.14460bc.el5_7
subscription-manager-firstboot-0.98.3-1.git.16.14460bc.el5_7
subscription-manager-migration-0.98.3-1.git.16.14460bc.el5_7
subscription-manager-0.98.3-1.git.16.14460bc.el5_7

Steps to reproduce:

[root@tiger ~]# subscription-manager identity
Error: You need to register this system by running `register` command.  Try register --help.

[root@tiger ~]# subscription-manager refresh
Error: You need to register this system by running `register` command.  Try register --help.

[root@tiger ~]# subscription-manager redeem
Error: You need to register this system by running `register` command.  Try register --help.

Comment 8 William Poteat 2012-01-23 13:43:37 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 9 errata-xmlrpc 2012-02-21 06:42:25 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.