Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 886448 - Aviary api examples: option --timeout leads to Traceback
Aviary api examples: option --timeout leads to Traceback
Status: CLOSED ERRATA
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: condor-aviary (Show other bugs)
2.2
Unspecified Unspecified
low Severity low
: 2.3
: ---
Assigned To: Pete MacKinnon
Daniel Horák
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-12 05:25 EST by Daniel Horák
Modified: 2013-03-06 13:47 EST (History)
4 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-06 13:47:44 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0564 normal SHIPPED_LIVE Low: Red Hat Enterprise MRG Grid 2.3 security update 2013-03-06 18:37:09 EST

  None (edit)
Description Daniel Horák 2012-12-12 05:25:46 EST
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 13:14:02 EST
Better error handling on parse added.
Comment 3 Daniel Horák 2012-12-17 07:58:46 EST
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 09:46:45 EST
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 13:47:44 EST
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.