Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 886448

Summary: Aviary api examples: option --timeout leads to Traceback
Product: Red Hat Enterprise MRG Reporter: Daniel Horák <dahorak>
Component: condor-aviaryAssignee: Pete MacKinnon <pmackinn>
Status: CLOSED ERRATA QA Contact: Daniel Horák <dahorak>
Severity: low Docs Contact:
Priority: low    
Version: 2.2CC: esammons, matt, pmackinn, tstclair
Target Milestone: 2.3   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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 18:47:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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