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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user