Split from bug 635628 - Lubos Trilety 2011-01-28 08:13:22 EST Version: wallaby-0.10.4-2 There are still some commands which ends with incorrect code: 1.) Following command shouldn't print invalid option and should end with success - 0 # wallaby feature-import --help invalid option: --help Usage: wallaby feature-import [options] FILE Imports a wallaby feature from a specially-formatted configuration file. -h, --help displays this message -n, --name NAME name for given feature (overrides one specified in the file) # echo $? 1 2.) Wallaby command with invalid argument should exit with non-zero code # wallaby -arg invalid argument: -arg Usage: wallaby [options] command [command-args] Use "wallaby help commands" for a list of commands -h, --help shows this message -H, --host HOSTNAME qpid broker host (default localhost) -p, --port NUM qpid broker port (default 5672) -U, --user NAME qpid username -P, --password PASS qpid password -M, --auth-mechanism PASS authentication mechanism (ANONYMOUS, PLAIN, GSSAPI) # echo $? 0
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: C: Arguments -arg and feature-import --help exit with code 0 and 1 respectively. C: This is confusing, since -arg is not a valid argument and 0 suggests success. The opposite is true for feature-import --help. F: These cases are handled generally as a result of internal improvements to the wallaby shell. R: The wallaby shell will now exit with an appropriate exit status.
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,4 +1 @@ -C: Arguments -arg and feature-import --help exit with code 0 and 1 respectively. +Certain wallaby utility subcommands caused wallaby to exit with an unintuitive exit code, such as with 0 (zero, indicating success) instead of a non-zero exit code (indicating failure). With this update, wallaby exits with more intuitive exit codes that reflect the success or failure of the underlying operation.-C: This is confusing, since -arg is not a valid argument and 0 suggests success. The opposite is true for feature-import --help. -F: These cases are handled generally as a result of internal improvements to the wallaby shell. -R: The wallaby shell will now exit with an appropriate exit status.
Retested over current wallaby: # rpm -q wallaby-utils wallaby-utils-0.10.5-3.el6.noarch # wallaby feature-import --help Usage: wallaby feature-import [options] FILE Imports a wallaby feature from a specially-formatted configuration file. -h, --help displays this message -n, --name NAME name for given feature (overrides one specified in the file) # echo $? 0 # wallaby -arg invalid argument: -arg Usage: wallaby [options] command [command-args] Use "wallaby help commands" for a list of commands -h, --help shows this message -H, --host HOSTNAME qpid broker host (default localhost) -p, --port NUM qpid broker port (default 5672) -U, --user NAME qpid username -P, --password PASS qpid password -M, --auth-mechanism PASS authentication mechanism (ANONYMOUS, PLAIN, GSSAPI) # echo $? 0 Second issue still present on both supported archs RHEL5/RHEL6. If you try to 'wallaby -arg', or any other non-existent argument, the result code should be non-zero.
These issues are all fixed. Please file a new bug for further return code issues.
Retested with current version: wallaby-utils-0.10.5-4.el6.noarch # wallaby -arg invalid argument: -arg Usage: wallaby [options] command [command-args] Use "wallaby help commands" for a list of commands -h, --help shows this message -H, --host HOSTNAME qpid broker host (default localhost) -p, --port NUM qpid broker port (default 5672) -U, --user NAME qpid username -P, --password PASS qpid password -M, --auth-mechanism PASS authentication mechanism (ANONYMOUS, PLAIN, GSSAPI) # echo $? 1 Return code was corrected. >>> VERIFIED
Technical note can be viewed in the release notes for 2.0 at the documentation stage here: http://documentation-stage.bne.redhat.com/docs/en-US/Red_Hat_Enterprise_MRG/2.0/html-single/MRG_Release_Notes/index.html#tabl-MRG_Release_Notes-GRID_Update_Notes-RHM_Known_Issues
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHEA-2011-0889.html