Glance-api was able to hang in qpid notifier under heavy image creation load.
The ``thread`` and ``select`` modules used by the python-qpid for managing
the AMQP connection. When the eventlet was not able to switch between threads
because leaded to hang and/or pipe(2) leaking issues.
* Monkey patching the ``select`` and ``thread`` modules to be eventlet friendly
in order to avoid hanging issues.
* The reference to the connection object in the QpidStrategy
was replaceable by a concurrent thread, which could cause various issues.
Using just local variables for storing connection object in order to avoid
concurrent unsafe manipulation.
Reviewed: https:/ /review. openstack. org/47786 github. com/openstack/ glance/ commit/ 2e7aa761b6c2b31 f4cbd9703ee1909 0b6757508a
Committed: http://
Submitter: Jenkins
Branch: master
commit 2e7aa761b6c2b31 f4cbd9703ee1909 0b6757508a
Author: Attila Fazekas <email address hidden>
Date: Mon Sep 23 08:44:37 2013 +0200
Fixing glance-api hangs in the qpid notifier
Glance-api was able to hang in qpid notifier under heavy image creation load.
The ``thread`` and ``select`` modules used by the python-qpid for managing
the AMQP connection. When the eventlet was not able to switch between threads
because leaded to hang and/or pipe(2) leaking issues.
* Monkey patching the ``select`` and ``thread`` modules to be eventlet friendly
in order to avoid hanging issues.
* The reference to the connection object in the QpidStrategy
was replaceable by a concurrent thread, which could cause various issues.
Using just local variables for storing connection object in order to avoid
concurrent unsafe manipulation.
Fixing bug 1229042
Change-Id: I8fa8c4f36892b9 6d406216cb3c648 54a94ca9df7