if { $remote_exec } {
rexec $execSock $args
} else {
- puts "-- running: $args"
+ puts " -- running: $args"
eval exec $args
}
}
global activetool
global editor_only remote_exec execSock
- puts "setOperMode $mode"
+ puts "\nsetOperMode $mode"
if { $mode == "exec" } { ;# let's try something, sockets should be opened
nexec id -u
upvar 0 ::cf::[set ::curcfg]::ngnodemap ngnodemap
global mac_byte4 mac_byte5
- puts "l3node.instantiate $eid $node"
+ puts "\nl3node.INSTANTIATE $eid $node"
set node_id "$eid\.$node"
# OpenVZ VE ID moze biti samo numericki, dok nas node_id sadrzi
set peer [peerByIfc $node $ifc]
- puts "vidimo node: $node ifclist: $ifc peer: $peer"
+ puts " Node $node na lokalnom interfaceu (\$ifc) $ifc vidi (\$peer) $peer"
if { [nodeType $peer] == "rj45" } {
# TODO: RJ-45 nodes zasad ne podrzavamo
global remote_exec execSock
global viewcustomid
- puts "l3node.start $eid $node"
+ puts "\nl3node.START $eid $node"
set node_id "$eid\.$node"
set bootcfg [[typemodel $node].cfggen $node]
set bootcmd [[typemodel $node].bootcmd $node]
}
- puts " imamo typemodel=[typemodel $node]"
+ puts " typemodel=[typemodel $node]"
# puts "bootcfg=$bootcfg i bootcmd=$bootcmd"
if { ! $remote_exec } {
# puts " would write node_dir/boot.conf"
# catch nexec vimage $node_id $bootcmd $node_dir/boot.conf >& $node_dir/out.log &"
foreach line $bootcfg {
- puts " executing on $node: $line"
+ puts " executing on $node: $line"
set command $line
if { "$command" != "" } {
catch { nexec vzctl exec $node $command } ret
- if { $ret != "TCL_OK" } {
- puts " $ret"
- # TODO: proper GUI message box, plus batch mode handling
- }
+ # Ispravno izvedene naredbe u OpenVZ VE vracaju jedan prazan red
+ # pa ih se ignorira. Ako se preda prazan red kao naredba, takodjer je
+ # vracen jedan prazan red pa se i to ignorira.
+ if { $ret != "TCL_OK" && $ret != ""} {
+
+ puts " =>Command \"$command\" executed on $node returned: \
+ \"$ret\""
+
+
+ # TODO: batch mode handling
+ # TODO: cemu sluzi TCL_OK uvjet? tko njega postavlja? kako znati da je
+ # odgovor error a ne samo neki info
+ set str "Command \n\n \"$command\"\n\n executed on $node returned: \
+ \n\n\"$ret\"\n\n"
+ tk_messageBox -message $str -type ok -icon info \
+ -title "Configuration"
+ }
}
}
global remote_exec
global eid_base
- puts "deployCfg"
+ puts "\n= deployCfg starts ="
set mac_byte4 0
set mac_byte5 0
}
statline "Network topology instantiated in [expr [clock seconds] - $t_start] seconds ([llength $node_list] nodes and [llength $link_list] links)."
+
+ puts "\n= deployCfg end ="
}
global .c
global execMode
- puts "vimageCleanup $eid"
+ puts "\n= vimageCleanup $eid start ="
set t_start [clock seconds]
nexec vzctl destroy $node
}
- puts "*** missing bridge cleanup in main host"
+ puts " TODO: missing bridge cleanup in main host"
# FreeBSD metoda:
# foreach vimage $vimages {
# FreeBSD-only ciscenje eid tmp dira
# nexec rm -fr "/tmp/$eid"
statline "Cleanup completed in [expr [clock seconds] - $t_start] seconds."
+
+ puts "\n= vimageCleanup $eid end ="
}