yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #89862
[Bug 1993181] Re: [OVN] OVN metadata "MetadataProxyHandler" not working if workers=0
Reviewed: https://review.opendev.org/c/openstack/neutron/+/861649
Committed: https://opendev.org/openstack/neutron/commit/f43891bf866b65ceef0e51633afbbf57ee2a6be8
Submitter: "Zuul (22348)"
Branch: master
commit f43891bf866b65ceef0e51633afbbf57ee2a6be8
Author: Rodolfo Alonso Hernandez <ralonsoh@xxxxxxxxxx>
Date: Wed Oct 5 13:22:29 2022 +0200
[OVN] Allow to execute ``MetadataProxyHandler`` in a local thread
If configuration option "metadata_workers=0", the OVN metadata agent
will try to spawn the ``MetadataProxyHandler`` instance inside a local
thread, instead of creating a new process. In this case, the method
``MetadataProxyHandler.post_fork_initialize`` is never called and the
SB IDL is never created.
This patch passes the OVN metadata agent SB IDL instance to the proxy
handler instance. This also reduces the number of OVN database active
connections.
Closes-Bug: #1993181
Change-Id: If9d827228002de7e3a55be660da266b60b0dfb79
** Changed in: neutron
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1993181
Title:
[OVN] OVN metadata "MetadataProxyHandler" not working if workers=0
Status in neutron:
Fix Released
Bug description:
The OVN metadata service can spawn several "MetadataProxyHandler"
instances in separate processes. The number of workers
("metadata_workers") will define how many processes will be created.
If this configuration variable is set to zero, the parent process (in
the case the OVN metadata agent) won't create a new process but start
the service. The "wsgi.Server" instance will be started instead; that
means the "wsgi.Server" instance will use the thread pool "self.pool =
eventlet.GreenPool(1)" to execute the application. The server
application is an instance of
"neutron.agent.ovn.metadata.server.MetadataProxyHandler".
This instance of "MetadataProxyHandler" has a SB IDL connection. This
IDL connection is initialized in the "post_fork_initialize" call, that
is executed when the event (resources.PROCESS, events.AFTER_INIT) is
received. The problem is that when the "MetadataProxyHandler" instance
is called inside a thread, not a process, this method is not called
and the IDL connection is not initialized.
In order to solve this issue and at the same time save OVN DB
connections, the proposal is to resuse the OVN metadata IDL connection
with the Proxy thread.
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1993181/+subscriptions
References