Bug 886448 - Aviary api examples: option --timeout leads to Traceback
Summary: Aviary api examples: option --timeout leads to Traceback
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: condor-aviary
Version: 2.2
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: 2.3
: ---
Assignee: Pete MacKinnon
QA Contact: Daniel Horák
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-12 10:25 UTC by Daniel Horák
Modified: 2013-03-06 18:47 UTC (History)
4 users (show)

Fixed In Version: condor-7.8.8-0.2
Doc Type: Bug Fix
Doc Text:
Cause: Provide a timeout value from the command line for any of the Aviary sample python scripts. Consequence: Backtrace generated indicating that the timeout value applied to the internal Suds client was not an integer type. Fix: Modify utility function to cast input value for timeout to a valid integer type or catch an exception and output error message. Result: Supplied timeout values are correctly parsed and applied.
Clone Of:
Environment:
Last Closed: 2013-03-06 18:47:44 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 Daniel Horák 2012-12-12 10:25:46 UTC
Description of problem:
  Attribute --timeout in aviary api examples leads to Traceback.

Version-Release number of selected component (if applicable):
# rpm -q condor-aviary
  condor-aviary-7.6.5-0.22.el6.i686

How reproducible:
  100%

Steps to Reproduce:
  # cd /usr/share/condor/aviary/
  # export PYTHONPATH=":/usr/share/condor/aviary/module"

  # ./submit.py --timeout 1
    Traceback (most recent call last):
      File "./submit.py", line 49, in <module>
        client = create_suds_client(opts,wsdl,plugins)
      File "/usr/share/condor/aviary/module/aviary/util.py", line 42, in create_suds_client
        client = Client(wsdl, plugins=plugin_list, timeout=opts.timeout)
      File "/usr/lib/python2.6/site-packages/suds/client.py", line 110, in __init__
        self.set_options(**kwargs)
      File "/usr/lib/python2.6/site-packages/suds/client.py", line 130, in set_options
        p.update(kwargs)
      File "/usr/lib/python2.6/site-packages/suds/properties.py", line 259, in update
        self.set(n, v)
      File "/usr/lib/python2.6/site-packages/suds/properties.py", line 284, in set
        self.provider(name).__set(name, value)
      File "/usr/lib/python2.6/site-packages/suds/properties.py", line 424, in __set
        d.validate(value)
      File "/usr/lib/python2.6/site-packages/suds/properties.py", line 184, in validate
        raise AttributeError,msg
    AttributeError: "timeout" must be: (<type 'int'>, <type 'float'>)

  # ./submit.py --timeout 0.5
    Traceback (most recent call last):
      File "./submit.py", line 49, in <module>
        client = create_suds_client(opts,wsdl,plugins)
      File "/usr/share/condor/aviary/module/aviary/util.py", line 42, in create_suds_client
        client = Client(wsdl, plugins=plugin_list, timeout=opts.timeout)
      File "/usr/lib/python2.6/site-packages/suds/client.py", line 110, in __init__
        self.set_options(**kwargs)
      File "/usr/lib/python2.6/site-packages/suds/client.py", line 130, in set_options
        p.update(kwargs)
      File "/usr/lib/python2.6/site-packages/suds/properties.py", line 259, in update
        self.set(n, v)
      File "/usr/lib/python2.6/site-packages/suds/properties.py", line 284, in set
        self.provider(name).__set(name, value)
      File "/usr/lib/python2.6/site-packages/suds/properties.py", line 424, in __set
        d.validate(value)
      File "/usr/lib/python2.6/site-packages/suds/properties.py", line 184, in validate
        raise AttributeError,msg
    AttributeError: "timeout" must be: (<type 'int'>, <type 'float'>)
  
Actual results:
  Using parameter --timeout leads to Traceback.

Expected results:
  Parameter --timeout will be properly processed and not leads to Traceback.

Additional info:

Comment 1 Pete MacKinnon 2012-12-12 18:14:02 UTC
Better error handling on parse added.

Comment 3 Daniel Horák 2012-12-17 12:58:46 UTC
Python 2.4 on RHEL 5 not know the "except...as..." syntax:

$ ./submit.py 
Traceback (most recent call last):
  File "./submit.py", line 24, in ?
    from aviary.util import *
  File "/usr/share/condor/aviary/module/aviary/util.py", line 46
    except ValueError as ve:
                       ^
SyntaxError: invalid syntax

>>> ASSIGNED

Comment 4 Daniel Horák 2013-01-14 14:46:45 UTC
Tested and verified on RHEL 5.9/6.4 - i386/x86_64 with condor-aviary-7.8.8-0.3.

$ cd /usr/share/condor/aviary/
$ export PYTHONPATH="${PYTHONPATH}:/usr/share/condor/aviary/module"
$ ./submit.py --timeout 5
  1.0
$ ./submit.py -t 5
  2.0

Parameters -t/--timeout are properly processed and not lead to Traceback.

>>> VERIFIED

Comment 6 errata-xmlrpc 2013-03-06 18:47:44 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.