Index by: file name |
procedure name |
procedure call |
annotation
restartAll_proc.tcl
(annotations | original source)
####################################################################
# restart the nodeagent, sync the nodeagent, restart all running servers.
# NB: the node agent must be running in order to be restarted. There is no facility to start the noteagent remotely.
# NB: the restart is asynchronous. There is no wait for server restarts. Tail the logs to confirm restart.
####################################################################
proc restartAll { } {
global AdminConfig
global AdminControl
# display procedure arguments.
set procName [ lindex [ info level 0 ] 0 ]
putsLog "## proc - $procName"
foreach i [ info args $procName ] {
upvar 0 $i ilocal
set propertiesArray($i) $ilocal
}
putsLog "procedure arguments are................."
foreach { a b } [ array get propertiesArray ] {
putsLog [ format "%-35s %s" "$a" "$b" ]
}
# there may be more than one node agent.
set nodeAgentList [ $AdminControl queryNames type=NodeAgent,* ]
if { $nodeAgentList == {} } {
putsLog "ERROR: no Node Agents running in the cell"
return -code error
}
# restart the node
# sync the node
# restart the servers
putsLog "Restarting node agents........................"
foreach i $nodeAgentList {
regexp {(.*node\=)(.*)(,diagnosticProvider)} $i a b c d
putsLog [ format "%-5s %s" " " "restarting node agent for $c" ]
if { [ catch { $AdminControl invoke $i restart "true true" } r ] == 0 } {
putsLog [ format "%-5s %s" " " "NodeAgent $i started successfully" ]
putsLog $r
} else {
putsLog [ format "%-5s %s" " " "ERROR: NodeAgent $i failed to start" ]
putsLog $r
return -code error $r
}
}
}
Index by: file name |
procedure name |
procedure call |
annotation
File generated 2007-08-07 at 13:42.