Browse Source

[OVN] Load segments plugin in case not loaded in maintanance task

While the segments plugin is not loaded in neutron config, it should
be loaded anyways in OVN maintanance task, to operate on the first
default segment of each network.

Change-Id: Ideffacc2f478c95eeec881c82d1d5bae46ecdc74
Closes-Bug: 1883193
(cherry picked from commit 56f519f472adf235856853bf12bfeac0d16a8b3f)
changes/13/737813/1
Maciej Jozefczyk 3 weeks ago
committed by Maciej Józefczyk
parent
commit
2509d26eb4
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py

+ 5
- 0
neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py View File

@@ -30,6 +30,7 @@ from neutron.common.ovn import acl as acl_utils
from neutron.common.ovn import constants as ovn_const
from neutron.common.ovn import utils
from neutron.conf.plugins.ml2.drivers.ovn import ovn_conf
from neutron import manager
from neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb import ovn_client
from neutron.services.segments import db as segments_db

@@ -74,6 +75,10 @@ class OvnNbSynchronizer(OvnDbSynchronizer):
self.l3_plugin = directory.get_plugin(plugin_constants.L3)
self._ovn_client = ovn_client.OVNClient(ovn_api, sb_ovn)
self.segments_plugin = directory.get_plugin('segments')
if not self.segments_plugin:
self.segments_plugin = (
manager.NeutronManager.load_class_for_provider(
'neutron.service_plugins', 'segments')())

def stop(self):
if utils.is_ovn_l3(self.l3_plugin):


Loading…
Cancel
Save