only register tables used by os-vif

This change limits the tables registered in the native driver
to the set actully used by os-vif. This will shorten the inital
startup time and reconnection time if the ovs db connection is dropped.
as a result this will help mitigate bug #1929446 where on reconnection
the nova compute agent can stall until reconnection is completed.

Change-Id: I635dff2b4fcff905ca8f431eb7e928265200f92a
Partial-Bug: #1929446
This commit is contained in:
Sean Mooney 2021-08-23 13:11:16 +01:00
parent 09c0629bb7
commit e4dc8b5664
1 changed files with 4 additions and 1 deletions

View File

@ -23,12 +23,15 @@ from ovsdbapp.schema.open_vswitch import impl_idl
from vif_plug_ovs.ovsdb import api
REQUIRED_TABLES = ('Interface', 'Port', 'Bridge', 'Open_vSwitch')
def idl_factory(config):
conn = config.connection
schema_name = 'Open_vSwitch'
helper = idlutils.get_schema_helper(conn, schema_name)
helper.register_all()
for table in REQUIRED_TABLES:
helper.register_table(table)
return idl.Idl(conn, helper)