Commit 7d2bb50d authored by Mike Hibler's avatar Mike Hibler
Browse files

New config variables:

     $emulabconfig{"JAILIPBASE"} = "172.16.0.0";
     $emulabconfig{"JAILIPMASK"} = "255.240.0.0";

These are used to establish a route on boss and ops so they can talk to
inner vnodes.

     $emulabconfig{"MFSTARBALL"} = "tftpboot-elabinelab.tar.gz";
     $emulabconfig{"MFSVERSION"} = "53";
     $emulabconfig{"MFSCONSOLE"} = "sio";

Allow for customization of the MFSes.  The first is the most useful,
it provides some backend support for something Leigh suggested: the ability
to select in the NS file whether the inner-elab should use a "release"
set of files (MFSes, images, emulab source) or the current elabinelab version.
The last two might not be as useful.

Currently none of these new variables are actually passed in via tmcd,
they just get the default values shown above.
parent 1adb2069
......@@ -183,6 +183,17 @@ sub doboot()
STDERR->autoflush(1);
}
#
# XXX defaults for things that may or may not be passed in.
# Will be overridden if values are actually passed in.
#
$emulabconfig{"JAILIPBASE"} = "172.16.0.0";
$emulabconfig{"JAILIPMASK"} = "255.240.0.0";
$emulabconfig{"MFSTARBALL"} = "tftpboot-elabinelab.tar.gz";
$emulabconfig{"MFSVERSION"} = "53";
$emulabconfig{"MFSCONSOLE"} = "sio";
$emulabconfig{"WINSUPPORT"} = 0;
#
# Turn the tmcc results into a hash first. Then call the boss or ops
# setup function.
......@@ -201,17 +212,10 @@ sub doboot()
system("sysctl vfs.nfs.eacces_retry_count=20 >/dev/null 2>&1");
# Turn on windows support.
if (exists($emulabconfig{"WINSUPPORT"}) && $emulabconfig{"WINSUPPORT"}) {
if ($emulabconfig{"WINSUPPORT"}) {
$WINSUPPORT = 1;
}
#
# Temp hack; make sure control iface in full duplex mode! pc2000 problem.
#
# my $outer_controlif = `cat $BOOTDIR/controlif`;
# chomp($outer_controlif);
# mysystem("ifconfig $outer_controlif media 100baseTX mediaopt full-duplex");
if ($emulabconfig{"ROLE"} eq "ops") {
SetupOpsNode();
}
......@@ -395,8 +399,11 @@ sub SetupOpsNode()
print RC "ifconfig_${inner_controlif}=".
"\"inet $inner_ip netmask $inner_netmask ".
"media 100baseTX mediaopt full-duplex\"\n";
print RC "static_routes=\"outerboss\"\n";
print RC "static_routes=\"outerboss vnodes\"\n";
print RC "route_outerboss=\"$outer_bossip $outer_routerip\"\n";
print RC "route_vnodes=\"-net ". $emulabconfig{"JAILIPBASE"} .
" -netmask " . $emulabconfig{"JAILIPMASK"} .
" -iface $inner_controlif\"\n";
print RC "defaultrouter=\"$bossnode_ip\"\n";
print RC "hostname=\"" . $emulabconfig{"OPSNODE"} . "." . $domain . "\"\n";
......@@ -653,8 +660,11 @@ sub SetupBossNode()
print RC "ifconfig_${inner_controlif}=".
"\"inet $inner_ip netmask $inner_netmask ".
"media 100baseTX mediaopt full-duplex\"\n";
print RC "static_routes=\"outerboss\"\n";
print RC "static_routes=\"outerboss vnodes\"\n";
print RC "route_outerboss=\"$outer_bossip $outer_routerip\"\n";
print RC "route_vnodes=\"-net ". $emulabconfig{"JAILIPBASE"} .
" -netmask " . $emulabconfig{"JAILIPMASK"} .
" -iface $inner_controlif\"\n";
#
# Use natd so that internal control network can talk to outside world.
......@@ -717,14 +727,40 @@ sub SetupBossNode()
#
print "Copying over tftpboot tar file from web server and unpacking\n";
mysystem("wget -q -O ${TBDIR}/testbed/stuff/tftpboot.tar.gz ".
"http://www.emulab.net/downloads/tftpboot-elabinelab.tar.gz");
"http://www.emulab.net/downloads/".
$emulabconfig{"MFSTARBALL"});
mysystem("tar xzf ${TBDIR}/testbed/stuff/tftpboot.tar.gz ".
" -C /tftpboot");
#
# Its the generic stuff; must localize.
mysystem("cd /tftpboot; mv pxeboot.emu-sio pxeboot.emu; ".
" mv freebsd47 freebsd ; mv frisbee47 frisbee");
#
my $cons = $emulabconfig{"MFSCONSOLE"};
if (! -e "/tftpboot/pxeboot.emu-${cons}") {
$cons = "sio";
}
mysystem("cd /tftpboot; mv pxeboot.emu-${cons} pxeboot.emu");
print "Using ${cons} version of pxeboot...\n";
my $fv = $emulabconfig{"MFSVERSION"};
if (! -e "/tftpboot/freebsd${fv}") {
$fv = "47";
}
mysystem("cd /tftpboot; mv freebsd${fv} freebsd");
print "Using freebsd${fv} version of admin MFS...\n";
$fv = $emulabconfig{"MFSVERSION"};
if (! -e "/tftpboot/frisbee${fv}") {
$fv = "47";
}
mysystem("cd /tftpboot; mv frisbee${fv} frisbee");
print "Using frisbee${fv} version of disk load MFS...\n";
# XXX frisbee-53 appears in the os_info table for some images still
# XXX note: must copy, symlink won't work
mysystem("cd /tftpboot; cp -rp frisbee frisbee-53")
if ($fv eq "53");
# Create the compressed versions of the files
mysystem("cd /tftpboot/frisbee/boot; ./prepare; ".
......
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