From aa533b8a33eb0888b1f09ae8e773cfbeb1d3dda1 Mon Sep 17 00:00:00 2001 From: Martin Klozik Date: Tue, 28 Nov 2017 10:12:30 +0000 Subject: [PATCH] ovs_vanilla: Fix vswitch shutdown process Datapath must be removed before vswitch termination. JIRA: VSPERF-548 Change-Id: I7408ddc1b21e2bc02a44785dca07d9c026bc28c1 Signed-off-by: Martin Klozik Reviewed-by: Al Morton Reviewed-by: Christian Trautman Reviewed-by: Sridhar Rao Reviewed-by: Trevor Cooper --- vswitches/ovs_vanilla.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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): -- 2.16.6