From a7eb557680f47c985e2102b967fd7746859d9b67 Mon Sep 17 00:00:00 2001 From: Rich Lane Date: Tue, 18 Mar 2014 11:04:14 -0700 Subject: [PATCH] IVSSwitch: wait for ivs to terminate before tearing down node This was a problem when running IVS in a container. IVS would begin the process of closing controller connections on receiving SIGTERM, but often mininet would have continued on and removed the control network interface from the container before it could send the FIN. The controller wouldn't know the connection had been closed until it timed out much later. --- mininet/node.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mininet/node.py b/mininet/node.py index 51f01c1..ac3c64e 100644 --- a/mininet/node.py +++ b/mininet/node.py @@ -1124,6 +1124,7 @@ class IVSSwitch(Switch): def stop( self ): "Terminate IVS switch." self.cmd( 'kill %ivs' ) + self.cmd( 'wait' ) self.deleteIntfs() def attach( self, intf ):