Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-stable
Commits
eb2409e7
Commit
eb2409e7
authored
Aug 29, 2018
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A panoply of changes for OPSVM_ENABLE and Powder fixed nodes.
parent
5cf2ed45
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
9 deletions
+57
-9
tbsetup/ns2ir/elabinelab-xenopsvm.ns
tbsetup/ns2ir/elabinelab-xenopsvm.ns
+57
-9
No files found.
tbsetup/ns2ir/elabinelab-xenopsvm.ns
View file @
eb2409e7
...
@@ -24,8 +24,10 @@
...
@@ -24,8 +24,10 @@
#
#
# This file is intended to be included into another NS file. It is not
# This file is intended to be included into another NS file. It is not
# a stand alone file.
# a stand alone file.
#
#
set myboss [$ns node]
set vhost [$ns node]
set boss [$ns node]
set myboss $boss
tb-set-node-inner-elab-role $myboss boss+fs+router
tb-set-node-inner-elab-role $myboss boss+fs+router
tb-set-elabinelab-attribute CONFIG_OPSVM 1
tb-set-elabinelab-attribute CONFIG_OPSVM 1
...
@@ -50,6 +52,18 @@ if {[info exists ::TBCOMPAT::elabinelab_hardware("boss")]} {
...
@@ -50,6 +52,18 @@ if {[info exists ::TBCOMPAT::elabinelab_hardware("boss")]} {
} else {
} else {
tb-set-hardware $myboss $srvtype
tb-set-hardware $myboss $srvtype
}
}
tb-fix-node $boss $vhost
if {[info exists ::TBCOMPAT::elabinelab_hardware("xenhost")]} {
namespace eval TBCOMPAT {
tb-set-hardware $vhost $elabinelab_hardware("xenhost")
}
}
if {[info exists ::TBCOMPAT::elabinelab_fixnodes("xenhost")]} {
namespace eval TBCOMPAT {
tb-fix-node $vhost $elabinelab_fixnodes("xenhost")
}
}
if {[info exists ::TBCOMPAT::elabinelab_fixnodes("boss")]} {
if {[info exists ::TBCOMPAT::elabinelab_fixnodes("boss")]} {
namespace eval TBCOMPAT {
namespace eval TBCOMPAT {
...
@@ -132,14 +146,21 @@ if {[info exists ::TBCOMPAT::elabinelab_nodeos("xenhost")]} {
...
@@ -132,14 +146,21 @@ if {[info exists ::TBCOMPAT::elabinelab_nodeos("xenhost")]} {
set xenos $elabinelab_nodeos("xenhost")
set xenos $elabinelab_nodeos("xenhost")
}
}
}
}
tb-set-node-os $vhost $xenos
set bossos FBSD111-64-STD
if {[info exists ::TBCOMPAT::elabinelab_nodeos("boss")]} {
if {[info exists ::TBCOMPAT::elabinelab_nodeos("boss")]} {
namespace eval TBCOMPAT {
namespace eval TBCOMPAT {
tb-set-node-os $myboss $elabinelab_nodeos("boss") $xenos
set bossos $elabinelab_nodeos("boss")
tb-set-node-os $myboss $bossos $xenos
}
}
} else {
} else {
tb-set-node-os $myboss
FBSD111-64-STD
$xenos
tb-set-node-os $myboss
$bossos
$xenos
}
}
# Tell XEN setup the image we want to load in slice 2 for the OPS jail.
$myboss add-attribute XEN_SLICE2IMAGE "emulab-ops/$bossos"
# Need to make sure that rc.mkelab sees this too. It does the actual load.
tb-set-elabinelab-role-attribute "boss" OPSVM_IMAGE "emulab-ops/$bossos"
#
#
# Special stuff to set the IP and mask for the xen nodes. Temporary
# Special stuff to set the IP and mask for the xen nodes. Temporary
...
@@ -167,12 +188,14 @@ if { $bossfw != {} } {
...
@@ -167,12 +188,14 @@ if { $bossfw != {} } {
#
#
# We need to tell the XEN host to bump the size of partition four. In GB
# We need to tell the XEN host to bump the size of partition four. In GB
# Skip if the user has defined extra disks.
#
#
$myboss add-attribute XEN_EXTRAFS 50
set bossdisks [tb-get-elabinelab-role-attribute "boss" "XEN_EXTRADISKS"]
# Tell XEN setup the image we want to load in slice 2 for the OPS jail.
if { $bossdisks == {} } {
$myboss add-attribute XEN_SLICE2IMAGE emulab-ops/FBSD111-64-STD
$myboss add-attribute XEN_EXTRAFS 50
# Need to make sure that rc.mkelab sees this too. It does the actual load.
} else {
tb-set-elabinelab-role-attribute "boss" OPSVM_IMAGE emulab-ops/FBSD111-64-STD
$myboss add-attribute XEN_EXTRADISKS $bossdisks
}
#
#
# CPUs.
# CPUs.
...
@@ -196,3 +219,28 @@ if { $bossmem != {} } {
...
@@ -196,3 +219,28 @@ if { $bossmem != {} } {
$myboss add-attribute XEN_MEMSIZE 1000
$myboss add-attribute XEN_MEMSIZE 1000
}
}
#
# Debugging support; this turns off antispoofing for the VMs, but only
# for emulab-ops experiments when requested.
#
set spoof [tb-get-elabinelab-role-attribute "boss" "XEN_NOANTISPOOFING"]
if { $spoof != {} &&
(${::GLOBALS::pid} == "emulab-ops" || ${::GLOBALS::pid} == "testbed") } {
$myboss add-attribute "XEN_NOANTISPOOFING" $spoof
$vhost add-attribute "XEN_NOANTISPOOFING" $spoof
}
set script [tb-get-elabinelab-role-attribute "boss" "XEN_STARTUPSCRIPT"]
if { $script != {} &&
(${::GLOBALS::pid} == "emulab-ops" || ${::GLOBALS::pid} == "testbed") } {
$myboss add-attribute "XEN_STARTUPSCRIPT" $script
}
set thinpool [tb-get-elabinelab-role-attribute "boss" "XEN_LVMNOTHINPOOL"]
if { $thinpool != {} &&
(${::GLOBALS::pid} == "emulab-ops" || ${::GLOBALS::pid} == "testbed") } {
$vhost add-attribute "XEN_LVMNOTHINPOOL" $thinpool
}
set devices [tb-get-elabinelab-role-attribute "boss" "XEN_USBDEVICES"]
if { $devices != {} &&
(${::GLOBALS::pid} == "emulab-ops" || ${::GLOBALS::pid} == "testbed") } {
$myboss add-attribute "XEN_USBDEVICES" $devices
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment