[OVN] Fix ML2/OVN + Neutron DHCP agent use case
In an attempt to minimize the number of connections to the OVSDBs the
ML2/OVN driver stopped connecting to the OVN dbs if the Neutron worker
was a RpcWorker but, that introduced a regression for those using
ML2/OVN + Neutron DHCP agent (for baremetal provisioning).
Because the RpcWorker didn't have a connection to the OVN database the
Neutron DHCP agent wasn't able to create the DHCP port and failed with:
2021-07-13 13:36:18.116 17 ERROR neutron.plugins.ml2.managers if not
self._sb_ovn.chassis_exists(host):
2021-07-13 13:36:18.116 17 ERROR neutron.plugins.ml2.managers
AttributeError: 'NoneType' object has no attribute 'chassis_exists'
This patch adds the RpcWorker back to the list of workers that should
connect to the OVN databases.
Change-Id: I454f3b52376a02f6cc9ca9124083295631bd03d5
Closes-Bug: #1929633
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
(cherry picked from commit e5f19a29dc
)
This commit is contained in:
parent
d07ad0324a
commit
172a628c5a
|
@ -55,6 +55,7 @@ from neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb import maintenance
|
|||
from neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb import ovn_client
|
||||
from neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb import ovn_db_sync
|
||||
from neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb import worker
|
||||
from neutron import service
|
||||
from neutron.services.qos.drivers.ovn import driver as qos_driver
|
||||
from neutron.services.segments import db as segment_service_db
|
||||
from neutron.services.trunk.drivers.ovn import trunk_driver
|
||||
|
@ -225,7 +226,8 @@ class OVNMechanismDriver(api.MechanismDriver):
|
|||
@staticmethod
|
||||
def should_post_fork_initialize(worker_class):
|
||||
return worker_class in (neutron.wsgi.WorkerService,
|
||||
worker.MaintenanceWorker)
|
||||
worker.MaintenanceWorker,
|
||||
service.RpcWorker)
|
||||
|
||||
def post_fork_initialize(self, resource, event, trigger, payload=None):
|
||||
# Initialize API/Maintenance workers with OVN IDL connections
|
||||
|
|
Loading…
Reference in New Issue