Merge "Renamed ovs_vsctl_timeout into ovsdb_timeout"
This commit is contained in:
commit
a1aff7a4dc
@ -109,7 +109,7 @@ class VifPort(object):
|
||||
class BaseOVS(object):
|
||||
|
||||
def __init__(self):
|
||||
self.vsctl_timeout = cfg.CONF.ovs_vsctl_timeout
|
||||
self.vsctl_timeout = cfg.CONF.OVS.ovsdb_timeout
|
||||
self.ovsdb = ovsdb_api.from_config(self)
|
||||
|
||||
def add_manager(self, connection_uri, timeout=_SENTINEL):
|
||||
@ -117,10 +117,10 @@ class BaseOVS(object):
|
||||
|
||||
:param connection_uri: Manager target string
|
||||
:param timeout: The Manager probe_interval timeout value
|
||||
(defaults to ovs_vsctl_timeout)
|
||||
(defaults to ovsdb_timeout)
|
||||
"""
|
||||
if timeout is _SENTINEL:
|
||||
timeout = cfg.CONF.ovs_vsctl_timeout
|
||||
timeout = cfg.CONF.OVS.ovsdb_timeout
|
||||
with self.ovsdb.transaction() as txn:
|
||||
txn.add(self.ovsdb.add_manager(connection_uri))
|
||||
if timeout:
|
||||
|
@ -45,12 +45,12 @@ def api_factory(context):
|
||||
try:
|
||||
_connection = connection.Connection(
|
||||
idl=n_connection.idl_factory(),
|
||||
timeout=cfg.CONF.ovs_vsctl_timeout)
|
||||
timeout=cfg.CONF.OVS.ovsdb_timeout)
|
||||
except TypeError:
|
||||
#pylint: disable=unexpected-keyword-arg,no-value-for-parameter
|
||||
_connection = connection.Connection(
|
||||
idl_factory=n_connection.idl_factory, # noqa
|
||||
timeout=cfg.CONF.ovs_vsctl_timeout)
|
||||
timeout=cfg.CONF.OVS.ovsdb_timeout)
|
||||
return NeutronOvsdbIdl(_connection)
|
||||
|
||||
|
||||
|
@ -17,17 +17,18 @@ from oslo_config import cfg
|
||||
|
||||
from neutron._i18n import _
|
||||
|
||||
# Default timeout for ovs-vsctl command
|
||||
DEFAULT_OVS_VSCTL_TIMEOUT = 10
|
||||
# Default timeout for ovsdb commands
|
||||
DEFAULT_OVSDB_TIMEOUT = 10
|
||||
|
||||
OPTS = [
|
||||
cfg.IntOpt('ovs_vsctl_timeout',
|
||||
default=DEFAULT_OVS_VSCTL_TIMEOUT,
|
||||
help=_('Timeout in seconds for ovs-vsctl commands. '
|
||||
'If the timeout expires, ovs commands will fail with '
|
||||
cfg.IntOpt('ovsdb_timeout',
|
||||
default=DEFAULT_OVSDB_TIMEOUT,
|
||||
deprecated_name='ovs_vsctl_timeout', deprecated_group='DEFAULT',
|
||||
help=_('Timeout in seconds for ovsdb commands. '
|
||||
'If the timeout expires, ovsdb commands will fail with '
|
||||
'ALARMCLOCK error.')),
|
||||
]
|
||||
|
||||
|
||||
def register_ovs_agent_opts(cfg=cfg.CONF):
|
||||
cfg.register_opts(OPTS)
|
||||
cfg.register_opts(OPTS, 'OVS')
|
||||
|
@ -148,11 +148,14 @@ def list_base_agent_opts():
|
||||
('DEFAULT',
|
||||
itertools.chain(
|
||||
neutron.conf.agent.common.INTERFACE_OPTS,
|
||||
neutron.conf.agent.common.INTERFACE_DRIVER_OPTS,
|
||||
neutron.conf.agent.ovs_conf.OPTS)
|
||||
neutron.conf.agent.common.INTERFACE_DRIVER_OPTS)
|
||||
),
|
||||
('agent', neutron.conf.agent.common.AGENT_STATE_OPTS),
|
||||
('ovs', neutron.conf.agent.ovsdb_api.API_OPTS),
|
||||
('ovs',
|
||||
itertools.chain(
|
||||
neutron.conf.agent.ovsdb_api.API_OPTS,
|
||||
neutron.conf.agent.ovs_conf.OPTS)
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
The ``ovs_vsctl_timeout`` option is renamed into ``ovsdb_timeout`` to
|
||||
reflect that it's not specific to ``vsctl`` implementation of
|
||||
``ovsdb_interface``. It is also moved under ``[OVS]`` section.
|
Loading…
x
Reference in New Issue
Block a user