Bug 873601

Summary: Even with unknown command subcription-manager returns exit code 0
Product: Red Hat Enterprise Linux 5 Reporter: Miroslav Suchý <msuchy>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED ERRATA QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.10CC: bkearney, dgoodwin, jgalipea, jsefler, mganisin, skallesh
Target Milestone: beta   
Target Release: 5.10   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 1.8.2 Doc Type: Bug Fix
Doc Text:
No description necessary
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-30 22:50:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 840995, 841211, 920191    

Description Miroslav Suchý 2012-11-06 09:44:49 UTC
Description of problem:
Run subscription-manager with unknow command. It print help page and exit with zero exit code. While I would assume non zero exit code.

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

How reproducible:
deterministc

Steps to Reproduce:
1. run "subscription-manager foo"
2. run "echo $?"
  
Actual results:
0

Expected results:
1

Comment 2 Bryan Kearney 2012-12-20 19:38:02 UTC
commit d6cb812efcb35ba547ba595e3a39f14064ea4b72
Author: Bryan Kearney <bkearney>
Date:   Thu Dec 20 13:32:50 2012 -0500

    873601: Return a non zero code if subscription manager is run with an incorrect command name

Comment 3 Bryan Kearney 2013-02-08 17:18:50 UTC
Fixed in the 1.8.2 version of subscription-manager or python-rhsm

Comment 4 Bryan Kearney 2013-02-08 20:11:00 UTC
*** Bug 906124 has been marked as a duplicate of this bug. ***

Comment 5 Bryan Kearney 2013-02-08 20:41:03 UTC
*** Bug 908662 has been marked as a duplicate of this bug. ***

Comment 6 Shwetha Kallesh 2013-02-11 08:09:10 UTC
Verifying version

[root@rhel7 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 0.7.24-1
subscription-manager: 1.8.2-1.el7
python-rhsm: 1.8.2-1.el7


[root@rhel7 ~]# subscription-manager foo
Usage: subscription-manager MODULE-NAME [MODULE-OPTIONS] [--help]

[root@rhel7 ~]# echo $?
1


Marking verified!!

Comment 7 RHEL Program Management 2013-04-09 19:59:56 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 9 errata-xmlrpc 2013-09-30 22:50:24 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-2013-1332.html