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 54b18556 authored by Leigh B. Stoller's avatar Leigh B. Stoller

tb-set-ip-routing command for Mike and router support. Remove the

previous tb-set-node-routertype, and replace with a global directive
that sets the router for the entire NS file (all nodes). Also change
from "gated" to "ospf". New command is:

	tb-set-ip-routing "none|ospf"
parent 27a9cbab
......@@ -40,7 +40,6 @@ Node instproc init {s} {
$self set deltas ""
$self set tarfiles ""
$self set failureaction "fatal"
$self set routertype "none"
}
# The following procs support renaming (see README)
......@@ -81,6 +80,7 @@ Node instproc updatedb {DB} {
$self instvar routertype
var_import ::GLOBALS::pid
var_import ::GLOBALS::eid
var_import ::GLOBALS::default_ip_routing_type
# If we haven't specified a osid so far then we should fill it
# with the id from the node_types table now.
......@@ -99,7 +99,7 @@ Node instproc updatedb {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\",\"$routertype\")";
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\")";
}
# add_lanlink lanlink
......
......@@ -139,6 +139,9 @@ namespace eval GLOBALS {
# This will hold the handle for the database connection
variable DB {}
# These are going to be default values within the NS file.
variable default_ip_routing_type "none"
}
# Connect to the DB
......
......@@ -151,17 +151,19 @@ proc tb-set-node-deltas {node args} {
}
$node set deltas [join $args :]
}
proc tb-set-node-routertype {node type} {
proc tb-set-ip-routing {type} {
var_import ::GLOBALS::default_ip_routing_type
if {$type == {}} {
perror "\[tb-set-node-routertype] No type given."
perror "\[tb-set-ip-routing] No type given."
return
}
if {($type != "none") &&
($type != "gated")} {
perror "\[tb-set-node-routertype] Type is not one of none|gated"
($type != "ospf")} {
perror "\[tb-set-ip-routing] Type is not one of none|ospf"
return
}
$node set routertype $type
set default_ip_routing_type $type
}
# Lan/Link state routines.
......
......@@ -19,4 +19,4 @@ proc tb-set-node-lan-bandwidth {node lan bw} {}
proc tb-set-node-lan-loss {node lan loss} {}
proc tb-set-node-lan-params {node lan delay bw loss} {}
proc tb-set-node-failure-action {node type} {}
proc tb-set-node-routertype {node type} {}
proc tb-set-ip-routing {type} {}
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