yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #23526
[Bug 1364814] Re: Neutron multiple api workers can't send cast message to agent when use zeromq
As I found out the problem is in zmq context which is a singleton and thus is created only once. [1] This leads to problems when there is more than one process working with it. [2]
The solution is to make zmq context thread-local by using threading.local class. [3]
I have a working fix that I will upload shortly.
[1] https://github.com/openstack/oslo.messaging/blob/master/oslo/messaging/_drivers/impl_zmq.py#L813
[2] http://lists.zeromq.org/pipermail/zeromq-dev/2011-December/014900.html
[3] https://docs.python.org/2/library/threading.html#threading.local
** Also affects: oslo.messaging
Importance: Undecided
Status: New
** Changed in: neutron
Status: Confirmed => Opinion
** Changed in: oslo.messaging
Status: New => Confirmed
** Changed in: oslo.messaging
Assignee: (unassigned) => Elena Ezhova (eezhova)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1364814
Title:
Neutron multiple api workers can't send cast message to agent when use
zeromq
Status in OpenStack Neutron (virtual network service):
Opinion
Status in Messaging API for OpenStack:
In Progress
Bug description:
When I set api_workers > 0 in Neutron configuration, delelting or adding router interface, Neutron L3 agent can't receive message from Neutron Server.
In this situation, L3 agent report state can cast to Neutron Server, meanwhile it can receive cast message from Neutron Server.(use call method)
Obviously, Neutron Server can use cast method for sending message to
L3 agent, But why cast routers_updated fails? This also occurs in
other Neutron agent.
Then I make a test, write some codes in Neutron server starts or
l3_router_plugins, sends cast periodic message to L3 agent directly.
From L3 agent rpc-zmq-receiver log file shows it receives message from
Neutron Server.
By the way, everything works well when api_workers = 0.
Test environment:
neutron(master) + oslo.messaging(master) + zeromq
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1364814/+subscriptions
References