Skip to content

Commit 5684138

Browse files
committed
[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 70a2029)
1 parent 01b9f19 commit 5684138

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

neutron/agent/ovn/metadata/server.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,7 @@ def run(self):
223223
'neutron-ovn-metadata-agent')
224224
# Set the default metadata_workers if not yet set in the config file
225225
md_workers = self.conf.metadata_workers
226-
if md_workers is None:
227-
md_workers = 2
226+
md_workers = 0 if md_workers is None else md_workers
228227
sb_idl = self.sb_idl if md_workers == 0 else None
229228
self.server.start(MetadataProxyHandler(self.conf, self.chassis,
230229
sb_idl),
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
upgrade:
3+
- |
4+
The default value for the ``metadata_workers`` configuration option
5+
has changed to 0 for the ML2/OVN driver. Since `[OVN] Allow to execute
6+
"MetadataProxyHandler" in a local thread <https://review.opendev.org/c/openstack/neutron/+/861649>`_,
7+
the OVN metadata proxy handler can be spawned in the same process of
8+
the OVN metadata agent, in a local thread. That reduces the number of
9+
OVN SB database connections to one.

0 commit comments

Comments
 (0)