Activity log for bug #1568824

Date Who What changed Old value New value Message
2016-04-11 12:05:13 Lucian Petrut bug added bug
2016-04-18 09:38:10 OpenStack Infra os-win: status New Fix Released
2016-04-20 11:17:42 OpenStack Infra tags in-stable-mitaka
2016-04-20 13:09:18 Alessandro Pilotti os-win: importance Undecided Medium
2016-04-20 13:09:37 Alessandro Pilotti os-win: assignee Lucian Petrut (petrutlucian94)
2016-04-20 13:10:56 Lucian Petrut description PyMI subscribes to event providers, setting a callback that will be invoked when an event arrives. When called, the event watcher will block until an event is retrieved. A threading.Event is used internally by PyMI for the event waiting workflow. The issue is that the threading module will be monkey patched by eventlet. The event callback is performed from a different thread, so attempting to set the event for which the event watcher waits will some times raise the "error: cannot switch to a different thread" greenlet exception, thus breaking the event listener. This issue can be fixed at the os-win level, without having PyMI to know about eventlet. We can make sure that PyMI uses the unpatched threading module, also ensuring that the blocking calls are run in a different thread, so that we don't block the calling thread, preventing other greenthreads from continuing theri execution. eventlet.tpool can be used to easily achieve this. PyMI subscribes to event providers, setting a callback that will be invoked when an event arrives. When called, the event watcher will block until an event is retrieved. A threading.Event is used internally by PyMI for the event waiting workflow. The issue is that the threading module will be monkey patched by eventlet. The event callback is performed from a different thread, so attempting to set the event for which the event watcher waits will some times raise the "error: cannot switch to a different thread" greenlet exception, thus breaking the event listener. This issue can be fixed at the os-win level, without having PyMI to know about eventlet. We can make sure that PyMI uses the unpatched threading module, also ensuring that the blocking calls are run in a different thread, so that we don't block the calling thread, preventing other greenthreads from continuing theri execution. eventlet.tpool can be used to easily achieve this. Trace: http://paste.openstack.org/show/494805/