[Openstack] Is nova-client thread safe ?

Jay Pipes jaypipes at gmail.com
Mon Jan 21 18:49:05 UTC 2013


On 01/21/2013 01:24 PM, Day, Phil wrote:
> Hi Folks,
> 
> Does anyone know if the nova-client python binding is written to be
> thread safe ? 
> 
> We saw some odd behavour when using it with multiple threads, and before
> digging deeper just thought I’d check if there were known issues, etc.

The client itself, as you know, just makes HTTP calls, so it's unlikely
that the client calls themselves are not thread-safe, as they don't have
any state associated with them.

The stuff that may not be thread-safe is wherever novaclient is saving
state. The only thing that does, AFAIK, are the two cache mechanisms --
the keyring token/mgmt_URL caching [1] and the file-based UUID cache
manager [2]. That's where I'd look to make thread-safe changes.

Best,
-jay

[1]
https://github.com/openstack/python-novaclient/blob/master/novaclient/client.py#L381
[2]
https://github.com/openstack/python-novaclient/blob/master/novaclient/base.py#L82




More information about the Openstack mailing list