[openstack-dev] [novaclient] invoking methods on the same client object in different theads caused malformed requests
Chris Friesen
chris.friesen at windriver.com
Tue Apr 3 15:44:13 UTC 2018
On 04/03/2018 04:25 AM, Xiong, Huan wrote:
> Hi,
>
> I'm using a cloud benchmarking tool [1], which creates a *single* nova
> client object in main thread and invoke methods on that object in different
> worker threads. I find it generated malformed requests at random (my
> system has python-novaclient 10.1.0 installed). The root cause was because
> some methods in novaclient (e.g., those in images.py and networks.py)
> changed client object's service_type. Since all threads shared a single
> client object, the change caused other threads generated malformed requests
> and hence the failure.
>
> I wonder if this is a known issue for novaclient, or the above approach is
> not supported?
In general, unless something says it is thread-safe you should assume it is not.
Chris
More information about the OpenStack-dev
mailing list