Bug 631804
Summary: | condor_router_history not handled exception when bad option is passed | ||
---|---|---|---|
Product: | Red Hat Enterprise MRG | Reporter: | Lubos Trilety <ltrilety> |
Component: | condor | Assignee: | Erik Erlandson <eerlands> |
Status: | CLOSED ERRATA | QA Contact: | Lubos Trilety <ltrilety> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 1.0 | CC: | jneedle, matt, mkudlej, tstclair |
Target Milestone: | 2.0.1 | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | condor-7.6.2-0.2 | Doc Type: | Bug Fix |
Doc Text: |
Running the condor_router_history utility with incorrect argument values could have caused a stack dump due to uncaught argument-handling exceptions. Argument parsing now includes proper exception-handling routines so that command usage errors are now handled gracefully, and helpful error messages are printed to the console when an argument is incorrect.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2011-09-07 16:44:45 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: | 712529 | ||
Bug Blocks: | 723887 |
Description
Lubos Trilety
2010-09-08 12:37:43 UTC
Upstream patch: https://condor-wiki.cs.wisc.edu/index.cgi/attach_get/375/gt2234-router-history-except repro/test: before fix, bad options yield a stack trace: $ condor_router_history --xxx Traceback (most recent call last): File "/usr/local/condor/bin/condor_router_history", line 129, in <module> options,args = getopt.getopt(sys.argv[1:],"h",long_options) File "/usr/lib64/python2.6/getopt.py", line 89, in getopt opts, args = do_longs(opts, args[0][2:], longopts, args[1:]) File "/usr/lib64/python2.6/getopt.py", line 153, in do_longs has_arg, opt = long_has_args(opt, longopts) File "/usr/lib64/python2.6/getopt.py", line 170, in long_has_args raise GetoptError('option --%s not recognized' % opt, opt) getopt.GetoptError: option --xxx not recognized after fix, bad options yield error message with usage: $ condor_router_history --xxx Command line argument error: option --xxx not recognized 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) $ condor_router_history --age=xxx Command line argument error: invalid literal for float(): xxx 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) 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: Cause: Argument handling exceptions in condor_router_history were not caught and handled. Consequence: Argument errors caused a stack dump instead of a helpful error message. Fix: Added proper exception handling around argument parsing. Result: Argument errors now are now handled gracefully with a helpful error message. Fix pending upstream, targeted for 7.6.2 Tested on:
$CondorVersion: 7.6.3 Jul 13 2011 BuildID: RH-7.6.3-0.2.el5 $
$CondorPlatform: I686-RedHat_5.7 $
$CondorVersion: 7.6.3 Jul 13 2011 BuildID: RH-7.6.3-0.2.el5 $
$CondorPlatform: X86_64-RedHat_5.7 $
$CondorVersion: 7.6.3 Jul 13 2011 BuildID: RH-7.6.3-0.2.el6 $
$CondorPlatform: I686-RedHat_6.1 $
$CondorVersion: 7.6.3 Jul 13 2011 BuildID: RH-7.6.3-0.2.el6 $
$CondorPlatform: X86_64-RedHat_6.1 $
$ condor_router_history -bad
Command line argument error: option -b not recognized
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)
You have new mail in /var/spool/mail/condor_user
$ condor_router_history --days=x
Command line argument error: invalid literal for float(): x
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)
$ condor_router_history --days=0.01
Routed job history from 2011-07-26 16:44 to 2011-07-26 16:58
Site Hours Jobs Runs
Completed Aborted
-------------------------------------------------------
Site1 0 13 0
Site2 0 13 0
-------------------------------------------------------
TOTAL 0 26 0
>>> VERIFIED
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,11 +1 @@ -Cause: +Running the condor_router_history utility with incorrect argument values could have caused a stack dump due to uncaught argument-handling exceptions. Argument parsing now includes proper exception-handling routines so that command usage errors are now handled gracefully, and helpful error messages are printed to the console when an argument is incorrect.-Argument handling exceptions in condor_router_history were not caught and handled. - -Consequence: -Argument errors caused a stack dump instead of a helpful error message. - -Fix: -Added proper exception handling around argument parsing. - -Result: -Argument errors now are now handled gracefully with a helpful error message. 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/RHSA-2011-1249.html |