Commit a926c1ff authored by Leigh B. Stoller's avatar Leigh B. Stoller

A few fixes to the NOSETUP option of elabinelab.

parent 35f7deb5
......@@ -174,6 +174,14 @@ exit(0)
my $firewall;
my $firewalled = TBExptFirewall($pid, $eid, \$firewall);
#
# XXX NOSETUP option needs more work ...
#
$query_result =
DBQueryFatal("select elabinelab_nosetup from experiments ".
"where pid='$pid' and eid='$eid'");
my ($nosetup) = $query_result->fetchrow_array();
#
# Presetup; turn off firewall.
#
......@@ -259,7 +267,6 @@ elsif ($update) {
exit(UpdateEmulab());
}
if (1) {
#
# Get elabinelab info. If this is a container for an actual experiment,
# then need to fire off the experiment once the inner emulab is ready to
......@@ -370,6 +377,9 @@ $UID = $SAVEUID;
# Run as real user for the next few scripts, which are setuid.
$EUID = $UID;
goto skipsetup
if ($nosetup);
#
# Restart DHCPD, but first mark the nodes as being ready to boot inside
# the inner emulab, so that dhcpd_makeconf knows what nodes to change
......@@ -453,7 +463,6 @@ if (@expnodes) {
TBSetNodeEventState($node, TBDB_NODESTATE_ISUP());
}
}
}
#
# Fire off inner elab experiment.
......@@ -499,6 +508,7 @@ if (defined($elabinelab_eid)) {
$UID = $SAVEUID;
unlink("/tmp/$$.ns");
}
skipsetup:
#
# Turn the firewall back on.
......
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2004, 2005 University of Utah and the Flux Group.
# Copyright (c) 2004, 2005, 2006 University of Utah and the Flux Group.
# All rights reserved.
#
# XXX I hardwire IPs into generated /etc/rc.conf and /etc/rc.resolv.
......@@ -671,6 +671,9 @@ sub SetupOpsNode($)
unlink("/etc/rc.conf.d/dhclient")
if (-e "/etc/rc.conf.d/dhclient");
goto skippkg
if ($NOSETUP);
#
# Do this as a separate step because PKG_DIR might be an NFS path,
# but we must do the NFS unmounts before running ops-install.
......@@ -704,6 +707,7 @@ sub SetupOpsNode($)
$ENV{"PKG_PATH"} = $emulabconfig{FS_PKG_DIR};
mysystem("pkg_add $emulabconfig{FS_PKG} >/tmp/fs-perrs 2>&1");
}
skippkg:
#
# Clean up a few things on the image and create symlinks into ${TBDIR} for
......@@ -873,10 +877,6 @@ sub SetupOpsNode($)
mysystem("echo '/usr/local/etc/emulab/rc/rc.inelab' ".
" >> /etc/rc.local");
# Ack, still waiting for new images.
mysystem("cp ${TBDIR}/testbed/src/testbed/tmcd/common/rc.inelab ".
" /usr/local/etc/emulab/rc/rc.inelab");
return
if ($NOSETUP);
......@@ -1003,6 +1003,9 @@ sub SetupBossNode()
if (! -d "/var/db/mysql");
mysystem("$BINDIR/mkextrafs.pl -f -s 2 /var/db/mysql");
goto skippkg
if ($NOSETUP);
#
# Do this as a separate step cause we need the NFS mounts, but
# must do the unmounts before running ops-install.
......@@ -1032,6 +1035,7 @@ sub SetupBossNode()
#
# mysystem("tar xzf ${TBDIR}/testbed/stuff/extras.tar.gz -C /");
skippkg:
#
# We no longer need anything from NFS, and we need to unmount everything
# so we can mount new NFS filesystems in their proper places.
......@@ -1238,10 +1242,6 @@ sub SetupBossNode()
#
mysystem("echo '/usr/local/etc/emulab/rc/rc.inelab' ".
" >> /etc/rc.local");
# Ack, still waiting for new images.
mysystem("cp ${TBDIR}/testbed/src/testbed/tmcd/common/rc.inelab ".
" /usr/local/etc/emulab/rc/rc.inelab");
}
#
......
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