aboutsummaryrefslogtreecommitdiffstats
path: root/vswitches
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2017-11-28 10:12:30 +0000
committerMartin Klozik <martinx.klozik@intel.com>2017-11-28 12:57:05 +0000
commitaa533b8a33eb0888b1f09ae8e773cfbeb1d3dda1 (patch)
treea84b168f4eb12f9d1b23f0d53604e885ce759255 /vswitches
parente1a3083e346bb53fa533e5c7ad3b7c14c3c6f0b9 (diff)
ovs_vanilla: Fix vswitch shutdown process
Datapath must be removed before vswitch termination. JIRA: VSPERF-548 Change-Id: I7408ddc1b21e2bc02a44785dca07d9c026bc28c1 Signed-off-by: Martin Klozik <martinx.klozik@intel.com> Reviewed-by: Al Morton <acmorton@att.com> Reviewed-by: Christian Trautman <ctrautma@redhat.com> Reviewed-by: Sridhar Rao <sridhar.rao@spirent.com> Reviewed-by: Trevor Cooper <trevor.cooper@intel.com>
Diffstat (limited to 'vswitches')
-rw-r--r--vswitches/ovs_vanilla.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/vswitches/ovs_vanilla.py b/vswitches/ovs_vanilla.py
index cfde3b45..942ddd41 100644
--- a/vswitches/ovs_vanilla.py
+++ b/vswitches/ovs_vanilla.py
@@ -16,6 +16,7 @@
"""
import logging
+import time
from conf import settings
from vswitches.ovs import IVSwitchOvs
from src.ovs import DPCtl
@@ -57,10 +58,14 @@ class OvsVanilla(IVSwitchOvs):
tasks.run_task(tap_cmd_list, self._logger, 'Deleting ' + tapx, False)
self._vport_id = 0
- super(OvsVanilla, self).stop()
+ # remove datapath before vswitch shutdown
dpctl = DPCtl()
dpctl.del_dp()
+ super(OvsVanilla, self).stop()
+
+ # give vswitch time to terminate before modules are removed
+ time.sleep(5)
self._module_manager.remove_modules()
def add_phy_port(self, switch_name):