Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1136191 - qpid-ha -h or --help should exit with returncode of 0
qpid-ha -h or --help should exit with returncode of 0
Status: CLOSED ERRATA
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-tools (Show other bugs)
Development
Unspecified Unspecified
low Severity low
: 3.2
: ---
Assigned To: Alan Conway
Frantisek Reznicek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-02 02:43 EDT by Frantisek Reznicek
Modified: 2015-11-15 20:17 EST (History)
4 users (show)

See Also:
Fixed In Version: qpid-tools-0.32-1
Doc Type: Bug Fix
Doc Text:
The `-h` and `--help` options were not recognized by +qpid-ha+, and were treated the same way as running +qpid-ha+ (without any argument). All returned the exit code `1` instead of `0`, which displayed `Exception: No valid command`. Fix: The `-h` and `-help` options are now implemented to return the result from `--help-all`, which displays command usage for +qpid-ha+ regardless of the commonly-passed method chosen by the user.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-08 09:09:07 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Current qpid-tools-0.22-14.el6 behavior (8.75 KB, text/plain)
2014-09-02 02:44 EDT, Frantisek Reznicek
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2015:1879 normal SHIPPED_LIVE Red Hat Enterprise MRG Messaging 3.2 Release 2015-10-08 13:07:53 EDT

  None (edit)
Description Frantisek Reznicek 2014-09-02 02:43:06 EDT
Description of problem:

qpid-ha -h or --help should exit with returncode of 0.

At the moment switches qpid-ha -h and qpid-ha --help are treated the same way as giving qpid-ha (w/o any argument) and all three return exitcode 1.

qpid-ha --help / -h should behave as --help-all i.e. exit with exit code 0 and avoid message 'Exception: No valid command'.


Version-Release number of selected component (if applicable):
qpid-tools-0.22-14.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. qpid-ha -h;echo $?
   $? == 1 but should be 0
2. qpid-ha --help; ecode $?
   $? == 1 but should be 0
3. qpid-ha --help-all; ecode $?
   $? == 0 which is perfect
4. qpid-ha; ecode $?
   $? == 1 which is perfect

Actual results:
  qpid-ha -h / --help exit codes for failure.

Expected results:
  qpid-ha -h / --help exit codes for pass.

Additional info:
Comment 1 Frantisek Reznicek 2014-09-02 02:44:31 EDT
Created attachment 933608 [details]
Current qpid-tools-0.22-14.el6 behavior
Comment 2 Alan Conway 2014-12-01 16:11:14 EST
Fixed.

------------------------------------------------------------------------
r1642758 | aconway | 2014-12-01 16:10:51 -0500 (Mon, 01 Dec 2014) | 2 lines

NO-JIRA: qpid-ha don't return error status if called with -h or --help flag.

------------------------------------------------------------------------
Comment 4 Frantisek Reznicek 2015-07-16 07:08:49 EDT
The exit code issue has been fully fixed, tested on RHEL 6.7 / 7.1 on packages
qpid-tools-0.34-1.el6.noarch
qpid-tools-0.34-1.el7.noarch

-> VERIFIED
Comment 6 errata-xmlrpc 2015-10-08 09:09:07 EDT
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.

https://rhn.redhat.com/errata/RHEA-2015-1879.html

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