[openstack-dev] [neutron][nova][oslo] Common backoff & timeout utils

Joshua Harlow harlowja at fastmail.com
Wed Apr 20 21:34:43 UTC 2016


Feel free to take the following (if its similar to what u are thinking)

https://github.com/openstack/anvil/blob/master/anvil/utils.py#L90

IMHO though if its a decorator, the retrying library can already perform 
this:

https://pypi.python.org/pypi/retrying

And a couple of the oslo-cores (jd, me) have contributed to that library 
and can explain how to use it...

Overall though, let's see an initial patch and I guess we can see where 
this goes and how much something like it may already exist elsewhere...

-Josh

Amrith Kumar wrote:
> Boden,
>
> Are you thinking of implementing something which would perform exponentially backed off calls to some arbitrary function till that method returns with something other than a timeout?
>
> I think that would be very versatile, and useful in a wide variety of places.
>
> Thanks,
>
> -amrith
>
>> -----Original Message-----
>> From: Davanum Srinivas [mailto:davanum at gmail.com]
>> Sent: Wednesday, April 20, 2016 4:45 PM
>> To: OpenStack Development Mailing List (not for usage questions)
>> <openstack-dev at lists.openstack.org>
>> Subject: Re: [openstack-dev] [neutron][nova][oslo] Common backoff&
>> timeout utils
>>
>> Sounds good to me Boden.
>>
>> -- Dims
>>
>> On Wed, Apr 20, 2016 at 4:10 PM, Boden Russell<bodenvmw at gmail.com>  wrote:
>>> Today there are a number of places in nova, neutron and perhaps
>>> elsewhere that employ backoff + timeout strategies (see [1] - [4]).
>>> While we are working towards a unified approach in neutron for RPC
>>> [5], it appears such logic could benefit the greater community as a
>>> reusable oslo implementation.
>>>
>>> IMHO such an oslo implementation could:
>>> - Enable backoff/timeout irrespective of client/transport. This would
>>> allow the utils to be used with various clients (HTTP, AMQP RPC, etc.).
>>> - Support namespacing as inspired by the existing neutron patch [5].
>>> - In the future, perhaps, allow multiple (pluggable) backoff
>>> strategies to be used (e.g. configurable backoff).
>>>
>>> Anyone adverse to me crafting an initial oslo patch to kick-off the
>>> details on this one?
>>>
>>>
>>> Thanks
>>>
>>>
>>> [1]
>>> https://github.com/openstack/nova/blob/master/nova/conductor/api.py#L1
>>> 62
>>> [2]
>>> https://github.com/openstack/nova/blob/3cdaa30566c17a2add5d9163a0693c9
>>> 7dc1d065b/nova/scheduler/utils.py#L356
>>> [3]
>>> https://github.com/openstack/neutron/blob/dd4f1253c951d78a5b497680dfb3
>>> 1317ba469a58/neutron/agent/l3/agent.py#L224
>>> [4]
>>> https://github.com/openstack/neutron/blob/42c6f05f2904cd4c01bcd3f79b19
>>> 66489f5ad3c1/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_dvr_neu
>>> tron_agent.py#L189 [5] https://review.openstack.org/#/c/280595/
>>>
>>> ______________________________________________________________________
>>> ____ OpenStack Development Mailing List (not for usage questions)
>>> Unsubscribe:
>>> OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>>
>> --
>> Davanum Srinivas :: https://twitter.com/dims
>>
>> __________________________________________________________________________
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



More information about the OpenStack-dev mailing list