All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 7af014a3 authored by Christopher Alfeld's avatar Christopher Alfeld

Added code for fixed nodes. tb-fix-node command.

parent c81da471
...@@ -40,6 +40,7 @@ Node instproc init {s} { ...@@ -40,6 +40,7 @@ Node instproc init {s} {
$self set deltas "" $self set deltas ""
$self set tarfiles "" $self set tarfiles ""
$self set failureaction "fatal" $self set failureaction "fatal"
$self set fixed ""
} }
# The following procs support renaming (see README) # The following procs support renaming (see README)
...@@ -78,6 +79,7 @@ Node instproc updatedb {DB} { ...@@ -78,6 +79,7 @@ Node instproc updatedb {DB} {
$self instvar tarfiles $self instvar tarfiles
$self instvar failureaction $self instvar failureaction
$self instvar routertype $self instvar routertype
$self instvar fixed
var_import ::GLOBALS::pid var_import ::GLOBALS::pid
var_import ::GLOBALS::eid var_import ::GLOBALS::eid
var_import ::GLOBALS::default_ip_routing_type var_import ::GLOBALS::default_ip_routing_type
...@@ -99,7 +101,7 @@ Node instproc updatedb {DB} { ...@@ -99,7 +101,7 @@ Node instproc updatedb {DB} {
} }
# Update the DB # Update the DB
sql exec $DB "insert into virt_nodes (pid,eid,vname,type,ips,osid,cmd_line,rpms,deltas,startupcmd,tarfiles,failureaction,routertype) values (\"$pid\",\"$eid\",\"$self\",\"$type\",\"$ipraw\",\"$osid\",\"$cmdline\",\"$rpms\",\"$deltas\",\"$startup\",\"$tarfiles\",\"$failureaction\",\"$default_ip_routing_type\")"; sql exec $DB "insert into virt_nodes (pid,eid,vname,type,ips,osid,cmd_line,rpms,deltas,startupcmd,tarfiles,failureaction,routertype,fixed) values (\"$pid\",\"$eid\",\"$self\",\"$type\",\"$ipraw\",\"$osid\",\"$cmdline\",\"$rpms\",\"$deltas\",\"$startup\",\"$tarfiles\",\"$failureaction\",\"$default_ip_routing_type\",\"$fixed\")";
} }
# add_lanlink lanlink # add_lanlink lanlink
......
...@@ -282,4 +282,13 @@ proc tb-set-node-failure-action {node type} { ...@@ -282,4 +282,13 @@ proc tb-set-node-failure-action {node type} {
return return
} }
$node set failureaction $type $node set failureaction $type
} }
\ No newline at end of file
proc tb-fix-node {vnode pnode} {
if {[$vnode info class] != "Node"} {
perror "\[tb-fix-node] $node is not a node."
return
}
$vnode set fixed $pnode
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment