Commit 65f63197 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Merge branch 'master' of git-public.flux.utah.edu:/flux/git/emulab-devel

parents fa1c524b 616b019d
......@@ -369,9 +369,12 @@ if ($install) {
fatal("Could not kill(TERM) process $dpid (dhcpd): $!");
}
my $old_uid = $UID;
$UID = $EUID;
for my $subboss (keys %subboss_dhcp_servers) {
RestartSubbossDhcp($subboss, $restart);
}
$UID = $old_uid;
}
TBScriptUnlock();
......@@ -394,7 +397,7 @@ sub fatal {
sub RestartSubbossDhcp($$)
{
my ($subboss, $restart) = @_;
my $cmd = "ssh $subboss @prefix@/sbin/subboss_dhcpd_makeconf";
$cmd .= " -r" if ($restart);
......
......@@ -1470,12 +1470,10 @@ sub Credential2SliceAggregate($)
my $slice;
my $aggregate;
print STDERR "Credential2SliceAggregate target_urn = $target_urn\n";
# First try the target urn, then fall back to the uuid
$slice = GeniSlice->Lookup($target_urn);
if (! defined($slice)) {
# Could not find it by urn, trying uuid
print STDERR "Credential2SliceAggregate target_uuid = $target_uuid\n";
$slice = GeniSlice->Lookup($target_uuid);
}
if (defined($slice)) {
......
......@@ -198,7 +198,7 @@ if (!defined($experiment)) {
tbdie("Could not lookup experiment object!")
}
my $special = ($pid eq "testbed" || $pid eq "tbres" || $pid eq "geni" ||
$pid eq "emulab-ops" || $pid eq "utahstud");
$pid eq "emulab-ops" || $pid eq "utahstud" || $pid eq "ResiliNets");
my $newsetup = $special;
#
......
......@@ -32,25 +32,51 @@ my $TBDIR = "/usr/testbed";
my ($bossname, $outer_bossip) = tmccbossinfo();
sub fix_syslog_conf()
{
my @buffer;
open SYSLOG_CONF, "+</etc/syslog.conf" or
Fatal("Couldn't open syslog.conf for writing");
while (<SYSLOG_CONF>) {
next if (/dhcp/i || /tftp/i);
push @buffer, $_;
}
seek SYSLOG_CONF, 0, 0;
print SYSLOG_CONF $_ for @buffer;
print SYSLOG_CONF "!dhcpd\n";
print SYSLOG_CONF "*.*\t\t\t\t\t\t/usr/testbed/log/dhcpd.log\n";
print SYSLOG_CONF "!tftpd\n";
print SYSLOG_CONF "*.*\t\t\t\t\t\t/usr/testbed/log/tftpd.log\n";
print SYSLOG_CONF "!frisbeed\n";
print SYSLOG_CONF "*.*\t\t\t\t\t\t/usr/testbed/log/frisbeed.log\n";
close SYSLOG_CONF;
}
sub doboot()
{
my $EXTRAFS = "/z";
my $TFTPBOOT_DIR = "$EXTRAFS/tftpboot";
my $LOG_DIR = "$EXTRAFS/log";
my $IMAGES_DIR = "$EXTRAFS/image_cache";
my $stuffdir = "$EXTRAFS/tmp";
my $MFSTARBALL = "tftpboot-subboss.tar.gz";
goto skipsetup if (!SUBBOSS());
print "Stopping tftpd (if running)";
print "Stopping tftpd (if running)\n ";
# This needs to be system(), not mysystem since we don't
# care if it fails.
system("/usr/local/etc/rc.d/tftpd-hpa.sh stop");
RecreateDir($EXTRAFS,1);
mysystem("$BINDIR/mkextrafs.pl -f $EXTRAFS");
mysystem("mkdir -p $TFTPBOOT_DIR $IMAGES_DIR $stuffdir");
mysystem("mkdir -p $TFTPBOOT_DIR $IMAGES_DIR $LOG_DIR $stuffdir");
mysystem("ln -sf $TFTPBOOT_DIR /tftpboot");
mysystem("ln -sf $IMAGES_DIR $TB/image_cache");
mysystem("ln -sf $IMAGES_DIR $TBDIR/image_cache");
mysystem("ln -sf $LOG_DIR $TBDIR/log");
print "Copying over tftpboot tar file from web server and unpacking\n";
......@@ -63,8 +89,11 @@ sub doboot()
mysystem("tar xzf $stuffdir/tftpboot.tar.gz -C /tftpboot");
# FIXME clean up stuffdir?
print "Restarting tftpd";
print "Restarting tftpd\n ";
mysystem("/usr/local/etc/rc.d/tftpd-hpa.sh start");
print "Configuring syslogd\n ";
fix_syslog_conf();
skipsetup:
......
......@@ -4291,7 +4291,7 @@ class subboss:
output="Node is not reserved: " + res[0][0])
# Must be a subboss.
if int(res[0][3]) != "subboss":
if res[0][1] != "subboss":
return EmulabResponse(RESPONSE_FORBIDDEN,
output="Not a subboss");
......@@ -4972,7 +4972,7 @@ class elabinelab:
stuff += l
pass
return EmulabResponse(RESPONSE_SUCCESS, value=stuff, output=output)
return EmulabResponse(RESPONSE_SUCCESS, output=output)
#
# Fire up a frisbeed for an image,
#
......
Supports Markdown
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