summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSławek Kapłoński <slawek@kaplonski.pl>2018-04-13 11:34:42 +0200
committerIhar Hrachyshka <ihrachys@redhat.com>2018-04-17 19:36:41 +0000
commit806d96cbbe45fcd473935e777a2a56037fbb9d12 (patch)
tree1e3fef180377c0d47fa94cc92ad1ae1525318ec3
parentfb75ce03197e6cff66963d92609a2b3d18ed627e (diff)
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
Notes
Notes (review): Code-Review+2: Ihar Hrachyshka <ihrachys@redhat.com> Workflow+1: Ihar Hrachyshka <ihrachys@redhat.com> Verified+1: Arista CI <arista-openstack-test@aristanetworks.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Wed, 18 Apr 2018 00:36:33 +0000 Reviewed-on: https://review.openstack.org/561186 Project: openstack/neutron Branch: refs/heads/master
-rw-r--r--neutron/cmd/ovs_cleanup.py5
-rw-r--r--releasenotes/notes/ovsdb_timeout_override_for_ovs_cleanup_tool-e6ed6db258d0819e.yaml15
2 files changed, 20 insertions, 0 deletions
diff --git a/neutron/cmd/ovs_cleanup.py b/neutron/cmd/ovs_cleanup.py
index 7472371..98c3b9f 100644
--- a/neutron/cmd/ovs_cleanup.py
+++ b/neutron/cmd/ovs_cleanup.py
@@ -26,6 +26,10 @@ from neutron.plugins.ml2.drivers.openvswitch.agent.common import constants
26 26
27LOG = logging.getLogger(__name__) 27LOG = logging.getLogger(__name__)
28 28
29# Default ovsdb_timeout value for this script.
30# It allows to clean bridges with even thousands of ports.
31CLEANUP_OVSDB_TIMEOUT = 600
32
29 33
30def setup_conf(): 34def setup_conf():
31 """Setup the cfg for the clean up utility. 35 """Setup the cfg for the clean up utility.
@@ -39,6 +43,7 @@ def setup_conf():
39 l3_config.register_l3_agent_config_opts(l3_config.OPTS, conf) 43 l3_config.register_l3_agent_config_opts(l3_config.OPTS, conf)
40 agent_config.register_interface_driver_opts_helper(conf) 44 agent_config.register_interface_driver_opts_helper(conf)
41 agent_config.register_interface_opts() 45 agent_config.register_interface_opts()
46 conf.set_default("ovsdb_timeout", CLEANUP_OVSDB_TIMEOUT, "OVS")
42 return conf 47 return conf
43 48
44 49
diff --git a/releasenotes/notes/ovsdb_timeout_override_for_ovs_cleanup_tool-e6ed6db258d0819e.yaml b/releasenotes/notes/ovsdb_timeout_override_for_ovs_cleanup_tool-e6ed6db258d0819e.yaml
new file mode 100644
index 0000000..5cc762c
--- /dev/null
+++ b/releasenotes/notes/ovsdb_timeout_override_for_ovs_cleanup_tool-e6ed6db258d0819e.yaml
@@ -0,0 +1,15 @@
1---
2fixes:
3 - |
4 Fixes bug `1763604 <https://bugs.launchpad.net/neutron/+bug/1763604>`_.
5 Override default value of ``ovsdb_timeout`` config option in
6 ``neutron-ovs-cleanup`` script.
7 The default value is 10 seconds, but that is not enough for the
8 ``neutron-ovs-cleanup`` script when there are many ports to remove from
9 a single bridge, for example, 5000. Because of that, we now override the
10 default value for the config option to be 600 seconds (10 minutes).
11issues:
12 - |
13 In the case when the number of ports to clean up in a single bridge is
14 larger than about 10000, it might require an increase in the
15 ``ovsdb_timeout`` config option to some value higher than 600 seconds.