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:
parent
09c0629bb7
commit
e4dc8b5664
@ -23,12 +23,15 @@ from ovsdbapp.schema.open_vswitch import impl_idl
|
|||||||
|
|
||||||
from vif_plug_ovs.ovsdb import api
|
from vif_plug_ovs.ovsdb import api
|
||||||
|
|
||||||
|
REQUIRED_TABLES = ('Interface', 'Port', 'Bridge', 'Open_vSwitch')
|
||||||
|
|
||||||
|
|
||||||
def idl_factory(config):
|
def idl_factory(config):
|
||||||
conn = config.connection
|
conn = config.connection
|
||||||
schema_name = 'Open_vSwitch'
|
schema_name = 'Open_vSwitch'
|
||||||
helper = idlutils.get_schema_helper(conn, schema_name)
|
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)
|
return idl.Idl(conn, helper)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user