Monkey patch threading module as early as possible

In oslo.messaging, local thread store is used to pass RPC request
context [1]. If we try to import oslo.messaging before monkey patching
threading library, it attempts to access unpatched storage and fails
with AttributeError.

[1]: oslo/messaging/localcontext.py#L26

blueprint oslo-messaging

Change-Id: Ied7302fcb1d3e14428540e39e3db704550027890
This commit is contained in:
Ihar Hrachyshka
2014-05-30 15:53:25 +02:00
parent fc8546d8c0
commit 161ec8341b
27 changed files with 96 additions and 96 deletions

View File

@@ -14,6 +14,8 @@
#
import eventlet
eventlet.monkey_patch()
import netaddr
from oslo.config import cfg
@@ -967,7 +969,6 @@ class L3NATAgentWithStateReport(L3NATAgent):
def main(manager='neutron.agent.l3_agent.L3NATAgentWithStateReport'):
eventlet.monkey_patch()
conf = cfg.CONF
conf.register_opts(L3NATAgent.OPTS)
config.register_interface_driver_opts_helper(conf)