deprecate ovs-vsctl driver and make native the default
The native ovsdb backend was added in stein with the intent of making it the default in train and removing the vsctl backend in ussuri. The default was never changed and the deprecation was not done so this change now does both. Change-Id: Iaeeb7eaa656611b3ae571c391d51fcbfd2b59670
This commit is contained in:
parent
d6e7521fc4
commit
d7928102d6
@ -0,0 +1,16 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
The ``vsctl`` ovsdb driver is now deprecated for removal.
|
||||
The default ovsdb interface has now been updated to ``native``.
|
||||
This will use the ovs python binding instead of invoking
|
||||
the ``ovs-vsctl`` CLI. The ``native`` backend both outperforms
|
||||
the ``vsctl`` backend and require no elevated privileges to
|
||||
configure the ovsdb. This both improves security and
|
||||
reduces plug and unplug time.
|
||||
upgrade:
|
||||
- |
|
||||
os-vif now uses the ``native`` ovsdb driver instead of ``vsctl`` driver.
|
||||
This reduces the number of privileged call that os-vif need to make
|
||||
and generally improves plugging performance. In future release the
|
||||
``vsctl`` backend will be removed.
|
@ -64,7 +64,15 @@ class OvsPlugin(plugin.PluginBase):
|
||||
'the ovsdb endpoint used.'),
|
||||
cfg.StrOpt('ovsdb_interface',
|
||||
choices=list(ovsdb_api.interface_map),
|
||||
default='vsctl',
|
||||
default='native',
|
||||
deprecated_for_removal=True,
|
||||
deprecated_since='2.2.0',
|
||||
deprecated_reason="""
|
||||
os-vif has supported ovsdb access via python bindings
|
||||
since Stein (1.15.0), starting in Victoria (2.2.0) the
|
||||
ovs-vsctl driver is now deprecated for removal and
|
||||
in future releases it will be be removed.
|
||||
""",
|
||||
help='The interface for interacting with the OVSDB'),
|
||||
# NOTE(sean-k-mooney): This value is a bool for two reasons.
|
||||
# First I want to allow this config option to be reusable with
|
||||
|
@ -28,7 +28,18 @@ class BaseOVS(object):
|
||||
self.timeout = config.ovs_vsctl_timeout
|
||||
self.connection = config.ovsdb_connection
|
||||
self.interface = config.ovsdb_interface
|
||||
self.ovsdb = ovsdb_api.get_instance(self)
|
||||
self._ovsdb = None
|
||||
|
||||
# NOTE(sean-k-mooney): when using the native ovsdb bindings
|
||||
# creating an instance of the ovsdb api connects to the ovsdb
|
||||
# to initialize the library based on the schema version
|
||||
# of the ovsdb. To avoid that we lazy load the ovsdb
|
||||
# instance the first time we need it via a property.
|
||||
@property
|
||||
def ovsdb(self):
|
||||
if not self._ovsdb:
|
||||
self._ovsdb = ovsdb_api.get_instance(self)
|
||||
return self._ovsdb
|
||||
|
||||
def _ovs_supports_mtu_requests(self):
|
||||
return self.ovsdb.has_table_column('Interface', 'mtu_request')
|
||||
|
Loading…
Reference in New Issue
Block a user