Comment 8 for bug 1696905

Revision history for this message
Ken Giusti (kgiusti) wrote :

Hi - sorry for the inexcusably late reply :(

I see the same issue with your reproducer you provided above. However that reproducer does not properly monkey patch in the case of the eventlet reproducer.

In order to use oslo.messaging with greenthreads (eventlet), the application must override all system library calls that can block the thread. Eventlet provides a method to do exactly that: monkey_patch().

See http://eventlet.net/doc/patching.html#monkey-patch

In the case of your failing script, I added:

import eventlet
eventlet.sleep()
eventlet.monkey_patch()

at the very top of the script, before all other imports. Once that's done the script no longer hangs.

(the second line - eventlet.sleep() may not be necessary. It is a work-around for a bug in my older version of eventlet: https://github.com/eventlet/eventlet/issues/428)