Bug 773434

Summary: Some condor_ commands with valid parameter '-help' return non zero exit code
Product: Red Hat Enterprise MRG Reporter: Timothy St. Clair <tstclair>
Component: condorAssignee: Timothy St. Clair <tstclair>
Status: CLOSED ERRATA QA Contact: Tomas Rusnak <trusnak>
Severity: low Docs Contact:
Priority: low    
Version: 2.1CC: esammons, ltoscano, matt, mkudlej, trusnak, tstclair
Target Milestone: 2.3   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
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.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-06 18:40:36 UTC Type: ---
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: 751072    
Bug Blocks:    

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