Add "rpc_response_max_timeout" config variable in OVS agent

The configuration variable "rpc_response_max_timeout" is not defined
in the OVS agent configuration. When the agent is stopped (SIGTERM),
the exception is raised. This error can be seen in the fullstack tests.

Change-Id: Ieedb6e87a4e98efef0f895566f7d4d88c3cd9336
Closes-Bug: #1815797
This commit is contained in:
Rodolfo Alonso Hernandez 2019-02-13 19:01:06 +00:00
parent d3a131d0b2
commit 84f8ae9d1f
5 changed files with 22 additions and 6 deletions

View File

@ -21,6 +21,7 @@ from neutron.common import config
from neutron.conf.agent import cmd
from neutron.conf.agent import common as agent_config
from neutron.conf.agent.l3 import config as l3_config
from neutron.conf import service as service_config
LOG = logging.getLogger(__name__)
@ -41,6 +42,7 @@ def setup_conf():
l3_config.register_l3_agent_config_opts(l3_config.OPTS, conf)
agent_config.register_interface_driver_opts_helper(conf)
agent_config.register_interface_opts()
service_config.register_service_opts(service_config.RPC_EXTRA_OPTS, conf)
conf.set_default("ovsdb_timeout", CLEANUP_OVSDB_TIMEOUT, "OVS")
return conf

View File

@ -19,7 +19,7 @@ from oslo_config import cfg
from neutron._i18n import _
service_opts = [
SERVICE_OPTS = [
cfg.IntOpt('periodic_interval',
default=40,
help=_('Seconds between running periodic tasks.')),
@ -39,9 +39,13 @@ service_opts = [
help=_('Range of seconds to randomly delay when starting the '
'periodic task scheduler to reduce stampeding. '
'(Disable by setting to 0)')),
]
RPC_EXTRA_OPTS = [
cfg.IntOpt('rpc_response_max_timeout',
default=600,
help=_('Maximum seconds to wait for a response from a call.')),
help=_('Maximum seconds to wait for a response from an RPC '
'call.')),
]

View File

@ -134,7 +134,8 @@ def list_opts():
neutron.conf.common.core_cli_opts,
neutron.conf.common.core_opts,
neutron.conf.wsgi.socket_opts,
neutron.conf.service.service_opts)
neutron.conf.service.SERVICE_OPTS,
neutron.conf.service.RPC_EXTRA_OPTS)
),
(neutron.conf.common.NOVA_CONF_SECTION,
itertools.chain(
@ -149,7 +150,8 @@ def list_base_agent_opts():
('DEFAULT',
itertools.chain(
neutron.conf.agent.common.INTERFACE_OPTS,
neutron.conf.agent.common.INTERFACE_DRIVER_OPTS)
neutron.conf.agent.common.INTERFACE_DRIVER_OPTS,
neutron.conf.service.RPC_EXTRA_OPTS)
),
('agent', neutron.conf.agent.common.AGENT_STATE_OPTS),
('ovs',
@ -201,7 +203,8 @@ def list_l3_agent_opts():
('DEFAULT',
itertools.chain(
neutron.conf.agent.l3.config.OPTS,
neutron.conf.service.service_opts,
neutron.conf.service.SERVICE_OPTS,
neutron.conf.service.RPC_EXTRA_OPTS,
neutron.conf.agent.l3.ha.OPTS,
neutron.conf.agent.common.PD_DRIVER_OPTS,
neutron.conf.agent.common.RA_OPTS)
@ -269,6 +272,10 @@ def list_ml2_conf_opts():
def list_ovs_opts():
return [
('DEFAULT',
itertools.chain(
neutron.conf.service.RPC_EXTRA_OPTS)
),
('ovs',
itertools.chain(
neutron.conf.plugins.ml2.drivers.ovs_conf.ovs_opts,

View File

@ -59,6 +59,7 @@ from neutron.common import constants as c_const
from neutron.common import utils as n_utils
from neutron.conf.agent import common as agent_config
from neutron.conf.agent import xenapi_conf
from neutron.conf import service as service_conf
from neutron.plugins.ml2.drivers.agent import capabilities
from neutron.plugins.ml2.drivers.l2pop.rpc_manager import l2population_rpc
from neutron.plugins.ml2.drivers.openvswitch.agent.common \
@ -2353,6 +2354,7 @@ def main(bridge_classes):
ovs_capabilities.register()
ext_manager.register_opts(cfg.CONF)
agent_config.setup_privsep()
service_conf.register_service_opts(service_conf.RPC_EXTRA_OPTS, cfg.CONF)
ext_mgr = ext_manager.L2AgentExtensionsManager(cfg.CONF)

View File

@ -40,7 +40,8 @@ from neutron.conf import service
from neutron import wsgi
service.register_service_opts(service.service_opts)
service.register_service_opts(service.SERVICE_OPTS)
service.register_service_opts(service.RPC_EXTRA_OPTS)
LOG = logging.getLogger(__name__)