Renamed ovs_vsctl_timeout into ovsdb_timeout
It's not specific to cli implementation of ovsdb interface. Also moved the option under [agent] section. Change-Id: Ic5e38d0c36ae29a9fef23038a9262d14ef1ede90
This commit is contained in:
parent
95fd904184
commit
a82d945f9f
@ -109,7 +109,7 @@ class VifPort(object):
|
|||||||
class BaseOVS(object):
|
class BaseOVS(object):
|
||||||
|
|
||||||
def __init__(self):
|
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)
|
self.ovsdb = ovsdb_api.from_config(self)
|
||||||
|
|
||||||
def add_manager(self, connection_uri, timeout=_SENTINEL):
|
def add_manager(self, connection_uri, timeout=_SENTINEL):
|
||||||
@ -117,10 +117,10 @@ class BaseOVS(object):
|
|||||||
|
|
||||||
:param connection_uri: Manager target string
|
:param connection_uri: Manager target string
|
||||||
:param timeout: The Manager probe_interval timeout value
|
:param timeout: The Manager probe_interval timeout value
|
||||||
(defaults to ovs_vsctl_timeout)
|
(defaults to ovsdb_timeout)
|
||||||
"""
|
"""
|
||||||
if timeout is _SENTINEL:
|
if timeout is _SENTINEL:
|
||||||
timeout = cfg.CONF.ovs_vsctl_timeout
|
timeout = cfg.CONF.OVS.ovsdb_timeout
|
||||||
with self.ovsdb.transaction() as txn:
|
with self.ovsdb.transaction() as txn:
|
||||||
txn.add(self.ovsdb.add_manager(connection_uri))
|
txn.add(self.ovsdb.add_manager(connection_uri))
|
||||||
if timeout:
|
if timeout:
|
||||||
|
@ -45,12 +45,12 @@ def api_factory(context):
|
|||||||
try:
|
try:
|
||||||
_connection = connection.Connection(
|
_connection = connection.Connection(
|
||||||
idl=n_connection.idl_factory(),
|
idl=n_connection.idl_factory(),
|
||||||
timeout=cfg.CONF.ovs_vsctl_timeout)
|
timeout=cfg.CONF.OVS.ovsdb_timeout)
|
||||||
except TypeError:
|
except TypeError:
|
||||||
#pylint: disable=unexpected-keyword-arg,no-value-for-parameter
|
#pylint: disable=unexpected-keyword-arg,no-value-for-parameter
|
||||||
_connection = connection.Connection(
|
_connection = connection.Connection(
|
||||||
idl_factory=n_connection.idl_factory, # noqa
|
idl_factory=n_connection.idl_factory, # noqa
|
||||||
timeout=cfg.CONF.ovs_vsctl_timeout)
|
timeout=cfg.CONF.OVS.ovsdb_timeout)
|
||||||
return NeutronOvsdbIdl(_connection)
|
return NeutronOvsdbIdl(_connection)
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,17 +17,18 @@ from oslo_config import cfg
|
|||||||
|
|
||||||
from neutron._i18n import _
|
from neutron._i18n import _
|
||||||
|
|
||||||
# Default timeout for ovs-vsctl command
|
# Default timeout for ovsdb commands
|
||||||
DEFAULT_OVS_VSCTL_TIMEOUT = 10
|
DEFAULT_OVSDB_TIMEOUT = 10
|
||||||
|
|
||||||
OPTS = [
|
OPTS = [
|
||||||
cfg.IntOpt('ovs_vsctl_timeout',
|
cfg.IntOpt('ovsdb_timeout',
|
||||||
default=DEFAULT_OVS_VSCTL_TIMEOUT,
|
default=DEFAULT_OVSDB_TIMEOUT,
|
||||||
help=_('Timeout in seconds for ovs-vsctl commands. '
|
deprecated_name='ovs_vsctl_timeout', deprecated_group='DEFAULT',
|
||||||
'If the timeout expires, ovs commands will fail with '
|
help=_('Timeout in seconds for ovsdb commands. '
|
||||||
|
'If the timeout expires, ovsdb commands will fail with '
|
||||||
'ALARMCLOCK error.')),
|
'ALARMCLOCK error.')),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def register_ovs_agent_opts(cfg=cfg.CONF):
|
def register_ovs_agent_opts(cfg=cfg.CONF):
|
||||||
cfg.register_opts(OPTS)
|
cfg.register_opts(OPTS, 'OVS')
|
||||||
|
@ -147,11 +147,14 @@ def list_base_agent_opts():
|
|||||||
('DEFAULT',
|
('DEFAULT',
|
||||||
itertools.chain(
|
itertools.chain(
|
||||||
neutron.conf.agent.common.INTERFACE_OPTS,
|
neutron.conf.agent.common.INTERFACE_OPTS,
|
||||||
neutron.conf.agent.common.INTERFACE_DRIVER_OPTS,
|
neutron.conf.agent.common.INTERFACE_DRIVER_OPTS)
|
||||||
neutron.conf.agent.ovs_conf.OPTS)
|
|
||||||
),
|
),
|
||||||
('agent', neutron.conf.agent.common.AGENT_STATE_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