From: marko Date: Mon, 8 Oct 2007 23:28:13 +0000 (+0000) Subject: When cleaning up a running experiment, always attempt to kill X-Git-Url: https://git.entuzijast.net/?a=commitdiff_plain;h=ab30d7214fd4396fb5f51abe7e5341960fec87d0;p=imunes.git When cleaning up a running experiment, always attempt to kill all processes in all vimages first. It seems that quagga has a bug which sets all zebra processes in an infinite loop if a network interface disappears while the suite is running. Before this change, we were "unplugging" the ng_eifaces while zebra & co. were still running, resulting in each vimage attempting to hog the CPU. This would leave very little CPU time for IMUNES scripts, and for any user interaction with the system for that matter, so cleaning up a more complex topology could last for quite a while. In short, the cleanup should be now roughly as fast as it used to be in 4.11 days. Bug found by: Submitted by: Reviewed by: Approved by: Obtained from: --- diff --git a/exec.tcl b/exec.tcl index 6d14b44..c9ce007 100755 --- a/exec.tcl +++ b/exec.tcl @@ -1,4 +1,4 @@ -# $Id: exec.tcl,v 1.56 2007/08/30 22:56:09 marko Exp $ +# $Id: exec.tcl,v 1.57 2007/10/08 23:28:13 marko Exp $ # Copyright 2004, 2005 University of Zagreb, Croatia. All rights reserved. # @@ -637,6 +637,13 @@ proc vimageCleanup {} { set defindex [lsearch $vimages default] set vimages [lreplace $vimages $defindex $defindex] + # Kill all processes in all vimages + foreach vimage $vimages { + set stattxt "Terminating processes in vimage $vimage" + statline $stattxt + catch {nexec vimage $vimage kill -9 -1 2> /dev/null} + } + # Detach / destroy / reassign interfaces pipe, eiface, iface, bridge set ngnodes [split [nexec ngctl l | tail -n +3] " "]