← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1993181] [NEW] [OVN] OVN metadata "MetadataProxyHandler" not working if workers=0

 

Public bug reported:

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.

** Affects: neutron
     Importance: Low
     Assignee: Rodolfo Alonso (rodolfo-alonso-hernandez)
         Status: New

** Changed in: neutron
   Importance: Undecided => Low

** Changed in: neutron
     Assignee: (unassigned) => Rodolfo Alonso (rodolfo-alonso-hernandez)

-- 
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:
  New

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



Follow ups