Bug 749625 - Add configurable connection timeout for Aviary Suds clients [RFE]
Summary: Add configurable connection timeout for Aviary Suds clients [RFE]
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: cumin
Version: Development
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: grid-maint-list
QA Contact: MRG Quality Engineering
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-27 17:50 UTC by Trevor McKay
Modified: 2016-05-26 20:23 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-26 20:23:29 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Trevor McKay 2011-10-27 17:50:46 UTC
Description of problem:

Default timeout for a bad URL is 90 seconds.  See if we can get a handle on the urllib2 "timeout" parameter and a config to control how soon Cumin connections to Aviary services will timeout.

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1.  Configure Cumin to talk to Aviary successfully with ssl.
2.  Change aviary-job-servers and/or aviary-query-servers addresses to use "http:" instead of "https:" as the scheme value.
3.  Try to do an aviary operation, like drilling into a submission.
  
Actual results:

Cumin will wait for 90 seconds saying "Loading..." before reporting an error.

Expected results:

If we have a configurable timeout, we should be able to set the timeout to something small (10 or 15 seconds) and report failure much earlier.

Additional info:

Tried a quick change to make this work in the development version, but there is something more complex going on.  Independent tests by pmackinn with standalone scripts show it working.  Deferring.

Comment 1 Trevor McKay 2011-10-27 20:33:58 UTC
Implementation note,

figured out how to set this in Cumin with custom transports, earlier problems have to do with the semantics of linked option sets between Clients and Transports in Suds.  Essentially, you really don't want to do the following because the undefined ordering of dictionary iterations can lead to the timeout being applied before the transport is updated, which won't work:

c = Client(url, transport=MyTransport, timeout=15)


Instead you want to do something like one of these

With default transport, just set the timeout:

c = Client(url, timeout=15)

or

c = Client(url)
c.setoptions(timeout=15)


With a custom transport, one of the following:

c = Client(url, transport=MyTransport(timeout=15))

or

c = Client(url, transport=MyTransport)
c.setoptions(timeout=15)

or maybe this if the client already exists...

t = MyTransport(timeout=15)
c.setoptions(transport=t)

or even this to preserve an existing timeout

t = MyTransport(timeout=c.options.timeout)
c.setoptions(transport=t)

Comment 3 Anne-Louise Tangring 2016-05-26 20:23:29 UTC
MRG-Grid is in maintenance and only customer escalations will be considered. This issue can be reopened if a customer escalation associated with it occurs.


Note You need to log in before you can comment on or make changes to this bug.