]> git.entuzijast.net Git - imunes.git/commitdiff
When cleaning up a running experiment, always attempt to kill
authormarko <marko>
Mon, 8 Oct 2007 23:28:13 +0000 (23:28 +0000)
committermarko <marko>
Mon, 8 Oct 2007 23:28:13 +0000 (23:28 +0000)
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:

exec.tcl

index 6d14b444c4ef31a93091691becea47cd2d9ebfaa..c9ce00785e3c885ceca0ad3e7e8cdaf5c46f0301 100755 (executable)
--- 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] "
 "]