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 b313b8e5 authored by Mike Hibler's avatar Mike Hibler

A bunch of cleanups.

Add a couple of variables at the top for the server/node hardware types
and server OS image.

Fix all the elabinelab_X(Y) references. Turns out that:
    elabinelab_fixnodes("boss")
(with quotes) is not the same array element as:
    elabinelab_fixnodes(boss)
(without quotes). And do to the way we coded things, only
elabinelab_X("boss") (or "ops" or "fs") worked, elabinelab_X(boss) would
not. But, only elabinelab_X(mypc1) would work and not elabinelab_X("mypc1")!
Now you should be able to use the unquoted versions of boss/ops/fs/mypcN.
Fun times with TCL.
parent 5a945ab6
......@@ -27,6 +27,9 @@
#
set myboss [$ns node]
set srvtype pc
set nodetype pcslow
tb-set-node-inner-elab-role $myboss boss+fs+router
tb-set-elabinelab-attribute CONFIG_OPSVM 1
tb-set-elabinelab-attribute OPSNODE myops
......@@ -36,7 +39,7 @@ if {[info exists ::TBCOMPAT::elabinelab_hardware("boss")]} {
tb-set-hardware $myboss $elabinelab_hardware("boss")
}
} else {
tb-set-hardware $myboss d710
tb-set-hardware $myboss $srvtype
}
if {[info exists ::TBCOMPAT::elabinelab_fixnodes("boss")]} {
......@@ -64,8 +67,6 @@ if {$myboss_tarfiles != ""} {
tb-set-node-tarfiles $myboss $myboss_tarfiles
}
tb-make-soft-vtype pcslow {pc3000}
#
# This is passed in by the parser, when wrapping an existing experiment.
# The parser wrapper gets info about the wrapped experiment and passes it
......@@ -99,7 +100,7 @@ for {set i 1} {$i <= $maxpcs} {incr i} {
tb-set-hardware [set $name] $elabinelab_hardware($name)
}
} else {
tb-set-hardware [set $name] pcslow
tb-set-hardware [set $name] $nodetype
}
}
......
......@@ -29,6 +29,10 @@ set myboss [$ns node]
set myops [$ns node]
set myfs [$ns node]
set srvtype pc
set nodetype pcslow
set srvos FBSD102-64-STD
tb-set-node-inner-elab-role $myboss boss+router
tb-set-node-inner-elab-role $myops ops
tb-set-node-inner-elab-role $myfs fs
......@@ -37,33 +41,53 @@ if {[info exists ::TBCOMPAT::elabinelab_hardware("boss")]} {
namespace eval TBCOMPAT {
tb-set-hardware $myboss $elabinelab_hardware("boss")
}
} elseif {[info exists ::TBCOMPAT::elabinelab_hardware(boss)]} {
namespace eval TBCOMPAT {
tb-set-hardware $myboss $elabinelab_hardware(boss)
}
} else {
tb-set-hardware $myboss d710
tb-set-hardware $myboss $srvtype
}
if {[info exists ::TBCOMPAT::elabinelab_hardware("ops")]} {
namespace eval TBCOMPAT {
tb-set-hardware $myops $elabinelab_hardware("ops")
}
} elseif {[info exists ::TBCOMPAT::elabinelab_hardware(ops)]} {
namespace eval TBCOMPAT {
tb-set-hardware $myops $elabinelab_hardware(ops)
}
} else {
tb-set-hardware $myops d710
tb-set-hardware $myops $srvtype
}
if {[info exists ::TBCOMPAT::elabinelab_hardware("fs")]} {
namespace eval TBCOMPAT {
tb-set-hardware $myfs $elabinelab_hardware("fs")
}
} elseif {[info exists ::TBCOMPAT::elabinelab_hardware(fs)]} {
namespace eval TBCOMPAT {
tb-set-hardware $myfs $elabinelab_hardware(fs)
}
} else {
tb-set-hardware $myfs d710
tb-set-hardware $myfs $srvtype
}
if {[info exists ::TBCOMPAT::elabinelab_fixnodes("boss")]} {
namespace eval TBCOMPAT {
tb-fix-node $myboss $elabinelab_fixnodes("boss")
}
} elseif {[info exists ::TBCOMPAT::elabinelab_fixnodes(boss)]} {
namespace eval TBCOMPAT {
tb-fix-node $myboss $elabinelab_fixnodes(boss)
}
}
if {[info exists ::TBCOMPAT::elabinelab_fixnodes("ops")]} {
namespace eval TBCOMPAT {
tb-fix-node $myops $elabinelab_fixnodes("ops")
}
} elseif {[info exists ::TBCOMPAT::elabinelab_fixnodes(ops)]} {
namespace eval TBCOMPAT {
tb-fix-node $myops $elabinelab_fixnodes(ops)
}
}
if {[info exists ::TBCOMPAT::elabinelab_fixnodes("fs")]} {
namespace eval TBCOMPAT {
......@@ -89,6 +113,13 @@ if {[info exists ::TBCOMPAT::elabinelab_tarfiles("boss")]} {
namespace eval TBCOMPAT {
append myboss_tarfiles $elabinelab_tarfiles("boss")
}
} elseif {[info exists ::TBCOMPAT::elabinelab_tarfiles(boss)]} {
if {$myboss_tarfiles != ""} {
append myboss_tarfiles " "
}
namespace eval TBCOMPAT {
append myboss_tarfiles $elabinelab_tarfiles(boss)
}
}
if {[info exists ::TBCOMPAT::elabinelab_tarfiles("ops")]} {
if {$myops_tarfiles != ""} {
......@@ -97,6 +128,13 @@ if {[info exists ::TBCOMPAT::elabinelab_tarfiles("ops")]} {
namespace eval TBCOMPAT {
append myops_tarfiles $elabinelab_tarfiles("ops")
}
} elseif {[info exists ::TBCOMPAT::elabinelab_tarfiles(ops)]} {
if {$myops_tarfiles != ""} {
append myops_tarfiles " "
}
namespace eval TBCOMPAT {
append myops_tarfiles $elabinelab_tarfiles(ops)
}
}
if {[info exists ::TBCOMPAT::elabinelab_tarfiles("fs")]} {
if {$myfs_tarfiles != ""} {
......@@ -105,6 +143,13 @@ if {[info exists ::TBCOMPAT::elabinelab_tarfiles("fs")]} {
namespace eval TBCOMPAT {
append myfs_tarfiles $elabinelab_tarfiles("fs")
}
} elseif {[info exists ::TBCOMPAT::elabinelab_tarfiles(fs)]} {
if {$myfs_tarfiles != ""} {
append myfs_tarfiles " "
}
namespace eval TBCOMPAT {
append myfs_tarfiles $elabinelab_tarfiles(fs)
}
}
if {$myboss_tarfiles != ""} {
tb-set-node-tarfiles $myboss $myboss_tarfiles
......@@ -116,8 +161,6 @@ if {$myfs_tarfiles != ""} {
tb-set-node-tarfiles $myfs $myfs_tarfiles
}
tb-make-soft-vtype pcslow {pc3000}
#
# This is passed in by the parser, when wrapping an existing experiment.
# The parser wrapper gets info about the wrapped experiment and passes it
......@@ -146,8 +189,12 @@ for {set i 1} {$i <= $maxpcs} {incr i} {
namespace eval TBCOMPAT {
tb-fix-node [set $name] $elabinelab_fixnodes($name)
}
} elseif {[info exists ::TBCOMPAT::elabinelab_hardware($name)]} {
namespace eval TBCOMPAT {
tb-set-hardware [set $name] $elabinelab_hardware($name)
}
} else {
tb-set-hardware [set $name] pcslow
tb-set-hardware [set $name] $nodetype
}
}
......@@ -172,34 +219,46 @@ if {[info exists ::TBCOMPAT::elabinelab_nodeos("boss")]} {
namespace eval TBCOMPAT {
tb-set-node-os $myboss $elabinelab_nodeos("boss")
}
} elseif {[info exists ::TBCOMPAT::elabinelab_nodeos(boss)]} {
namespace eval TBCOMPAT {
tb-set-node-os $myboss $elabinelab_nodeos(boss)
}
} elseif {[info exists ::TBCOMPAT::sitevariables(elabinelab/boss_osid)]} {
namespace eval TBCOMPAT {
tb-set-node-os $myboss $sitevariables(elabinelab/boss_osid)
}
} else {
tb-set-node-os $myboss FBSD102-64-STD
tb-set-node-os $myboss $srvos
}
if {[info exists ::TBCOMPAT::elabinelab_nodeos("ops")]} {
namespace eval TBCOMPAT {
tb-set-node-os $myops $elabinelab_nodeos("ops")
}
} elseif {[info exists ::TBCOMPAT::elabinelab_nodeos(ops)]} {
namespace eval TBCOMPAT {
tb-set-node-os $myops $elabinelab_nodeos(ops)
}
} elseif {[info exists ::TBCOMPAT::sitevariables(elabinelab/ops_osid)]} {
namespace eval TBCOMPAT {
tb-set-node-os $myops $sitevariables(elabinelab/ops_osid)
}
} else {
tb-set-node-os $myops FBSD102-64-STD
tb-set-node-os $myops $srvos
}
if {[info exists ::TBCOMPAT::elabinelab_nodeos("fs")]} {
namespace eval TBCOMPAT {
tb-set-node-os $myfs $elabinelab_nodeos("fs")
}
} elseif {[info exists ::TBCOMPAT::elabinelab_nodeos(fs)]} {
namespace eval TBCOMPAT {
tb-set-node-os $myfs $elabinelab_nodeos(fs)
}
} elseif {[info exists ::TBCOMPAT::sitevariables(elabinelab/fs_osid)]} {
namespace eval TBCOMPAT {
tb-set-node-os $myfs $sitevariables(elabinelab/fs_osid)
}
} else {
tb-set-node-os $myfs FBSD102-64-STD
tb-set-node-os $myfs $srvos
}
......@@ -28,6 +28,9 @@
set myboss [$ns node]
set myops [$ns node]
set srvtype pcvm
set nodetype pcslow
tb-set-node-inner-elab-role $myboss boss+router
tb-set-node-inner-elab-role $myops ops+fs
tb-set-colocate-factor 2
......@@ -40,14 +43,14 @@ if {[info exists ::TBCOMPAT::elabinelab_hardware("boss")]} {
tb-set-hardware $myboss $elabinelab_hardware("boss")
}
} else {
tb-set-hardware $myboss d710-vm
tb-set-hardware $myboss $srvtype
}
if {[info exists ::TBCOMPAT::elabinelab_hardware("ops")]} {
namespace eval TBCOMPAT {
tb-set-hardware $myops $elabinelab_hardware("ops")
}
} else {
tb-set-hardware $myops d710-vm
tb-set-hardware $myops $srvtype
}
if {[info exists ::TBCOMPAT::elabinelab_fixnodes("boss")]} {
......@@ -93,8 +96,6 @@ if {$myops_tarfiles != ""} {
tb-set-node-tarfiles $myops $myops_tarfiles
}
#tb-make-soft-vtype pcslow {pc3000}
#
# This is passed in by the parser, when wrapping an existing experiment.
# The parser wrapper gets info about the wrapped experiment and passes it
......@@ -131,7 +132,7 @@ for {set i 1} {$i <= $maxpcs} {incr i} {
tb-set-hardware [set $name] $elabinelab_hardware($name)
}
} else {
tb-set-hardware [set $name] pcslow
tb-set-hardware [set $name] $nodetype
}
}
......
#
# Copyright (c) 2004-2016 , 2017University of Utah and the Flux Group.
# Copyright (c) 2004-2017 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -28,6 +28,10 @@
set myboss [$ns node]
set myops [$ns node]
set srvtype pc
set nodetype pcslow
set srvos FBSD102-64-STD
tb-set-node-inner-elab-role $myboss boss+router
tb-set-node-inner-elab-role $myops ops+fs
......@@ -35,26 +39,42 @@ if {[info exists ::TBCOMPAT::elabinelab_hardware("boss")]} {
namespace eval TBCOMPAT {
tb-set-hardware $myboss $elabinelab_hardware("boss")
}
} elseif {[info exists ::TBCOMPAT::elabinelab_hardware(boss)]} {
namespace eval TBCOMPAT {
tb-set-hardware $myboss $elabinelab_hardware(boss)
}
} else {
tb-set-hardware $myboss d710
tb-set-hardware $myboss $srvtype
}
if {[info exists ::TBCOMPAT::elabinelab_hardware("ops")]} {
namespace eval TBCOMPAT {
tb-set-hardware $myops $elabinelab_hardware("ops")
}
} elseif {[info exists ::TBCOMPAT::elabinelab_hardware(ops)]} {
namespace eval TBCOMPAT {
tb-set-hardware $myops $elabinelab_hardware(ops)
}
} else {
tb-set-hardware $myops d710
tb-set-hardware $myops $srvtype
}
if {[info exists ::TBCOMPAT::elabinelab_fixnodes("boss")]} {
namespace eval TBCOMPAT {
tb-fix-node $myboss $elabinelab_fixnodes("boss")
}
} elseif {[info exists ::TBCOMPAT::elabinelab_fixnodes(boss)]} {
namespace eval TBCOMPAT {
tb-fix-node $myboss $elabinelab_fixnodes(boss)
}
}
if {[info exists ::TBCOMPAT::elabinelab_fixnodes("ops")]} {
namespace eval TBCOMPAT {
tb-fix-node $myops $elabinelab_fixnodes("ops")
}
} elseif {[info exists ::TBCOMPAT::elabinelab_fixnodes(ops)]} {
namespace eval TBCOMPAT {
tb-fix-node $myops $elabinelab_fixnodes(ops)
}
}
# Deal with tarfiles
......@@ -73,6 +93,13 @@ if {[info exists ::TBCOMPAT::elabinelab_tarfiles("boss")]} {
namespace eval TBCOMPAT {
append myboss_tarfiles $elabinelab_tarfiles("boss")
}
} elseif {[info exists ::TBCOMPAT::elabinelab_tarfiles(boss)]} {
if {$myboss_tarfiles != ""} {
append myboss_tarfiles " "
}
namespace eval TBCOMPAT {
append myboss_tarfiles $elabinelab_tarfiles(boss)
}
}
if {[info exists ::TBCOMPAT::elabinelab_tarfiles("ops")]} {
if {$myops_tarfiles != ""} {
......@@ -81,6 +108,13 @@ if {[info exists ::TBCOMPAT::elabinelab_tarfiles("ops")]} {
namespace eval TBCOMPAT {
append myops_tarfiles $elabinelab_tarfiles("ops")
}
} elseif {[info exists ::TBCOMPAT::elabinelab_tarfiles(ops)]} {
if {$myops_tarfiles != ""} {
append myops_tarfiles " "
}
namespace eval TBCOMPAT {
append myops_tarfiles $elabinelab_tarfiles(ops)
}
}
if {$myboss_tarfiles != ""} {
tb-set-node-tarfiles $myboss $myboss_tarfiles
......@@ -89,8 +123,6 @@ if {$myops_tarfiles != ""} {
tb-set-node-tarfiles $myops $myops_tarfiles
}
tb-make-soft-vtype pcslow {pc3000}
#
# This is passed in by the parser, when wrapping an existing experiment.
# The parser wrapper gets info about the wrapped experiment and passes it
......@@ -124,7 +156,7 @@ for {set i 1} {$i <= $maxpcs} {incr i} {
tb-set-hardware [set $name] $elabinelab_hardware($name)
}
} else {
tb-set-hardware [set $name] pcslow
tb-set-hardware [set $name] $nodetype
}
}
......@@ -148,24 +180,32 @@ if {[info exists ::TBCOMPAT::elabinelab_nodeos("boss")]} {
namespace eval TBCOMPAT {
tb-set-node-os $myboss $elabinelab_nodeos("boss")
}
} elseif {[info exists ::TBCOMPAT::elabinelab_nodeos(boss)]} {
namespace eval TBCOMPAT {
tb-set-node-os $myboss $elabinelab_nodeos(boss)
}
} elseif {[info exists ::TBCOMPAT::sitevariables(elabinelab/boss_osid)]} {
namespace eval TBCOMPAT {
tb-set-node-os $myboss $sitevariables(elabinelab/boss_osid)
}
} else {
tb-set-node-os $myboss FBSD102-64-STD
tb-set-node-os $myboss $srvos
}
if {[info exists ::TBCOMPAT::elabinelab_nodeos("ops")]} {
namespace eval TBCOMPAT {
tb-set-node-os $myops $elabinelab_nodeos("ops")
}
} elseif {[info exists ::TBCOMPAT::elabinelab_nodeos(ops)]} {
namespace eval TBCOMPAT {
tb-set-node-os $myops $elabinelab_nodeos(ops)
}
} elseif {[info exists ::TBCOMPAT::sitevariables(elabinelab/ops_osid)]} {
namespace eval TBCOMPAT {
tb-set-node-os $myops $sitevariables(elabinelab/ops_osid)
}
} else {
tb-set-node-os $myops FBSD102-64-STD
tb-set-node-os $myops $srvos
}
#
......
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