The module may be used in scope that is not using eventlet (f.e. from
inside neutron-keepalived-state-change), in which case a call to
greenthread.sleep from the main thread will result in AssertionError.
Instead of that, call time.sleep that will redirect to greenthread.sleep
in eventlet environment.
This reflects what we do in oslo.concurrency execute implementation.
Reviewed: https:/ /review. openstack. org/453838 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=757476983ca 0832099f04b9f02 9617ab270de9fe
Committed: https:/
Submitter: Jenkins
Branch: master
commit 757476983ca0832 099f04b9f029617 ab270de9fe
Author: Ihar Hrachyshka <email address hidden>
Date: Wed Apr 5 19:07:46 2017 +0000
execute: don't call greenthread.sleep directly
The module may be used in scope that is not using eventlet (f.e. from keepalived- state-change) , in which case a call to .sleep from the main thread will result in AssertionError.
inside neutron-
greenthread
Instead of that, call time.sleep that will redirect to greenthread.sleep
in eventlet environment.
This reflects what we do in oslo.concurrency execute implementation.
Change-Id: Id73c0e5015feca 2c559da4a68a70a eaaf5cec2a7
Closes-Bug: #1680183