Override ovsdb_timeout default value in ovs_cleanup tool

In case when there is a lot of ports to clean in bridge, default
ovsdb_timeout which is set for 10 seconds is not enough.
This patch overrides default 10 seconds timeout in neutron-ovs-cleanup
tool to 600 seconds.
600 seconds value was tested experimentally on my dev environment for
at least 10000 ports in bridge.

In case when user will have more ports to delete with this script,
it will be required to increase this ovsdb_timeout value in
configuration.

Change-Id: I79a554acdb1d6d61903be0c42d0215d302884e93
Closes-Bug: #1763604
This commit is contained in:
Sławek Kapłoński 2018-04-13 11:34:42 +02:00 committed by Ihar Hrachyshka
parent fb75ce0319
commit 806d96cbbe
2 changed files with 20 additions and 0 deletions

View File

@ -26,6 +26,10 @@ from neutron.plugins.ml2.drivers.openvswitch.agent.common import constants
LOG = logging.getLogger(__name__)
# Default ovsdb_timeout value for this script.
# It allows to clean bridges with even thousands of ports.
CLEANUP_OVSDB_TIMEOUT = 600
def setup_conf():
"""Setup the cfg for the clean up utility.
@ -39,6 +43,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()
conf.set_default("ovsdb_timeout", CLEANUP_OVSDB_TIMEOUT, "OVS")
return conf

View File

@ -0,0 +1,15 @@
---
fixes:
- |
Fixes bug `1763604 <https://bugs.launchpad.net/neutron/+bug/1763604>`_.
Override default value of ``ovsdb_timeout`` config option in
``neutron-ovs-cleanup`` script.
The default value is 10 seconds, but that is not enough for the
``neutron-ovs-cleanup`` script when there are many ports to remove from
a single bridge, for example, 5000. Because of that, we now override the
default value for the config option to be 600 seconds (10 minutes).
issues:
- |
In the case when the number of ports to clean up in a single bridge is
larger than about 10000, it might require an increase in the
``ovsdb_timeout`` config option to some value higher than 600 seconds.