[OVN] Set the default OVN metadata worker number to 0

If the configuration variable ``metadata_workers`` is not set,
the default value for ML2/OVN mechanism driver will be zero.
This value defines the number of separate workers that will
be spawned by the OVN metadata agent. By default, the OVN
metadata proxy handler will be executed inside the same OVN
metadata agent process, in a parallel thread. That reduces the
number of OVN SB database connections to one.

Related-Bug: #1993181
Change-Id: I8bc4f2784ccefe6078506bc27cc7a98c48192ad2
(cherry picked from commit 70a2029ca1)
This commit is contained in:
Rodolfo Alonso Hernandez 2022-10-05 21:35:48 +02:00 committed by Rodolfo Alonso
parent 99c404dacf
commit 40254f7235
2 changed files with 10 additions and 2 deletions

View File

@ -223,8 +223,7 @@ class UnixDomainMetadataProxy(object):
'neutron-ovn-metadata-agent')
# Set the default metadata_workers if not yet set in the config file
md_workers = self.conf.metadata_workers
if md_workers is None:
md_workers = 2
md_workers = 0 if md_workers is None else md_workers
sb_idl = self.sb_idl if md_workers == 0 else None
self.server.start(MetadataProxyHandler(self.conf, self.chassis,
sb_idl),

View File

@ -0,0 +1,9 @@
---
upgrade:
- |
The default value for the ``metadata_workers`` configuration option
has changed to 0 for the ML2/OVN driver. Since `[OVN] Allow to execute
"MetadataProxyHandler" in a local thread <https://review.opendev.org/c/openstack/neutron/+/861649>`_,
the OVN metadata proxy handler can be spawned in the same process of
the OVN metadata agent, in a local thread. That reduces the number of
OVN SB database connections to one.