Bug 773434 - Some condor_ commands with valid parameter '-help' return non zero exit code
Summary: Some condor_ commands with valid parameter '-help' return non zero exit code
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: condor
Version: 2.1
Hardware: All
OS: Linux
low
low
Target Milestone: 2.3
: ---
Assignee: Timothy St. Clair
QA Contact: Tomas Rusnak
URL:
Whiteboard:
Depends On: 751072
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-11 20:04 UTC by Timothy St. Clair
Modified: 2013-03-06 18:40 UTC (History)
6 users (show)

Fixed In Version: condor-7.8.7-0.6
Doc Type: Bug Fix
Doc Text:
C: Run commands with help switch -h C: The command returns non-zero on exit. F: Update commands to return zero when -h switch is present R: The commands return zero when -h switch is present.
Clone Of:
Environment:
Last Closed: 2013-03-06 18:40:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0564 0 normal SHIPPED_LIVE Low: Red Hat Enterprise MRG Grid 2.3 security update 2013-03-06 23:37:09 UTC

Description Timothy St. Clair 2012-01-11 20:04:12 UTC
There are still commands which returns $? != 0 for '-h' or '-help' parameter:
$  condor_cod -h; echo $?
...
1

$  condor_findhost -h; echo $?
...
1

$ condor_router_history -h; echo $?
...
1

$ condor_ssh_to_job -h; echo $?
...
2

$ condor_submit_dag -help; echo $?
...
1

$ condor_userlog -help; echo $?
...
1

$ condor_wait -help; echo $?
...
1

Tested with condor-7.6.5-0.11.el5/.el6.

Comment 3 Timothy St. Clair 2012-03-19 17:25:04 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:
C: Run commands with help switch -h 
C: The command returns non-zero on exit.
F: Update commands to return zero when -h switch is present
R: The commands return zero when -h switch is present.

Comment 8 Tomas Rusnak 2012-11-27 16:40:34 UTC
Reproduced with:

$CondorVersion: 7.6.5 Apr 02 2012 BuildID: RH-7.6.5-0.14.el5 $
$CondorPlatform: X86_64-RedHat_5.8 $

# condor_cod -h; echo $?
...
1
# condor_findhost -h; echo $?
...
1
# condor_router_history -h; echo $?
...
1
# condor_ssh_to_job -h; echo $?
...
2
condor_submit_dag -help; echo $?
...
1
condor_userlog -help; echo $?
...
1
condor_wait -help; echo $?
...
1

Comment 9 Tomas Rusnak 2012-11-27 16:44:01 UTC
Retested with:

$CondorVersion: 7.8.7 Nov 15 2012 BuildID: RH-7.8.7-0.5.el5 $
$CondorPlatform: X86_64-RedHat_5.8 $

$CondorVersion: 7.8.7 Nov 15 2012 BuildID: RH-7.8.7-0.5.el5 $
$CondorPlatform: I686-RedHat_5.8 $

# condor_router_history -h; echo $?

USAGE: condor_router_history [OPTIONS]
 --show_records             (show individual records in addition to summary)
 --show_iwd                 (when showing records, include working directory)
 --age=<days>               (how many days ago end time should be)
 --days=<days>              (how many days report should cover)
 --start="YYYY-MM-DD HH:MM" (date of start time of report)
Command line argument error: 0

USAGE: condor_router_history [OPTIONS]
 --show_records             (show individual records in addition to summary)
 --show_iwd                 (when showing records, include working directory)
 --age=<days>               (how many days ago end time should be)
 --days=<days>              (how many days report should cover)
 --start="YYYY-MM-DD HH:MM" (date of start time of report)
1

The condor_router_history command was not fixed on RHEL5 - on both 32/64 version.

>>> ASSIGNED

Comment 10 Timothy St. Clair 2012-11-28 19:22:04 UTC
on RHEL 5 version of python turns out sys.exit(0) raises an exception then calls Usage().  Fix is to call os._exit(0)

Comment 11 Tomas Rusnak 2012-12-10 14:19:58 UTC
Retested with:

$CondorVersion: 7.8.7 Dec 05 2012 BuildID: RH-7.8.7-0.6.el5 $
$CondorPlatform: X86_64-RedHat_5.9 $

$CondorVersion: 7.8.7 Dec 05 2012 BuildID: RH-7.8.7-0.6.el5 $
$CondorPlatform: I686-RedHat_5.9 $

# condor_router_history -h; echo $?

USAGE: condor_router_history [OPTIONS]
 --show_records             (show individual records in addition to summary)
 --show_iwd                 (when showing records, include working directory)
 --age=<days>               (how many days ago end time should be)
 --days=<days>              (how many days report should cover)
 --start="YYYY-MM-DD HH:MM" (date of start time of report)
0

>>> VERIFIED

Comment 15 errata-xmlrpc 2013-03-06 18:40:36 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/RHSA-2013-0564.html


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