# nam omoguci razne korisne stvari tipa proc filesystem itd
upvar 0 ::cf::[set ::curcfg]::[set node]::ve_dir ve_dir
set ve_boot_done "$ve_dir/tmp/imunes-boot-done"
- puts " waiting for VE $ve_id to actually start..."
+ puts -nonewline " Waiting for VE $node ($ve_id) to actually start "
while { ! [ file exists $ve_boot_done ] } {
after 300
puts -nonewline "."
# * eid -- experiment id
# * node -- node id
#****
-proc l3node.shutdown { eid node } {
+proc l3node.shutdown { eid node } {
upvar 0 ::cf::[set ::curcfg]::[set node]::node_id node_id
- puts "nexec vimage $node_id kill -9 -1 2> /dev/null"
- foreach ifc [ifcList $node] {
- foreach ipv4 [getIfcIPv4addr $node $ifc] {
- puts "nexec vimage $node_id ifconfig $ifc $ipv4 -alias"
- }
- foreach ipv6 [getIfcIPv6addr $node $ifc] {
- puts "nexec vimage $node_id ifconfig $ifc inet6 $ipv6 -alias"
- }
- }
- statline "Stopping VE $node"
+
+# puts "nexec vimage $node_id kill -9 -1 2> /dev/null"
+# foreach ifc [ifcList $node] {
+# foreach ipv4 [getIfcIPv4addr $node $ifc] {
+# puts "nexec vimage $node_id ifconfig $ifc $ipv4 -alias"
+# }
+# foreach ipv6 [getIfcIPv6addr $node $ifc] {
+# puts "nexec vimage $node_id ifconfig $ifc inet6 $ipv6 -alias"
+# }
+# }
+
+ puts " Stopping VE $node ($node_id)"
+ statline "Stopping VE $node ($node_id)"
nexec vzctl stop $node_id
}
# }
# puts "nexec vimage -d $node_id"
- statline "Destroying VE $node"
+ puts " Destroying VE $node ($node_id)"
+ statline "Destroying VE $node ($node_id)"
nexec vzctl destroy $node_id
# FreeBSD-only:
nexec brctl delbr $bridge
}
}
- puts " Done."
+ puts " Done.\n"
# Shut down all vimages
[typemodel $node].shutdown $eid $node
} else {
# L2 uredjaji kao hub i switch se u OpenVZ varijanti emuliraju
- # bridge suceljem a ne VEom, stoga nema se sto gasiti
- puts " Node $node is a L2 device emulated with a bridge. Stopping pending bridge cleanup."
+ # bridge suceljem a ne VEom iako su u $node_list, stoga nema se sto gasiti
+
+ # puts " Node $node is a L2 device emulated with a bridge. Stopping pending bridge cleanup."
}
}
- puts " Done."
+ puts " Done.\n"
# puts " nexec rm -f /usr/local/etc/quagga/Quagga.conf "
[typemodel $node].destroy $eid $node
} else {
# L2 uredjaji kao hub i switch se u OpenVZ varijanti emuliraju
- # bridge suceljem a ne VEom, stoga nema se sto gasiti
- puts " Node $node is a L2 device emulated with a bridge. Stopping pending bridge cleanup."
+ # bridge suceljem a ne VEom iako su u $node_list, stoga nema se sto gasiti
+
+ #puts " Node $node is a L2 device emulated with a bridge. Stopping pending bridge cleanup."
}
}
- puts " Done."
+ puts " Done.\n"
statline "Cleanup completed in [expr [clock seconds] - $t_start] seconds."