Commit 2affd7b5 authored by Leigh B Stoller's avatar Leigh B Stoller

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

parents 6cec53eb 1bfe2c68
......@@ -203,8 +203,24 @@ endif
subboss: client
@$(MAKE) -C utils subboss
subboss-install: subboss client-install
subboss-install: subboss
ifeq ($(EVENTSYS),1)
@$(MAKE) -C event client-install
endif
@$(MAKE) -C os client-install
ifneq ($(SYSTEM),CYGWIN_NT-5.1)
@$(MAKE) -C capture client-install
@$(MAKE) -C tip client-install
@$(MAKE) -C tools client-install
endif
@$(MAKE) -C sensors client-install
@$(MAKE) -C utils subboss-install
@$(MAKE) -C db subboss-install
@$(MAKE) -C tmcd subboss-install
@$(MAKE) -C rc.d subboss-install
# Hack: this should probably be done by a subboss-install
# script, but there isn't a huge need for that yet
@rm -f $(INSTALL_RCDIR)/isc-dhcpd
TARBALLDESTDIR = /var/tmp/emulab-client
......
......@@ -90,3 +90,5 @@ HAVE_ULXMLRPCPP = @HAVE_ULXMLRPCPP@
STANDALONE_CLEARINGHOUSE = @STANDALONE_CLEARINGHOUSE@
NODE_USAGE_SUPPORT = @NODE_USAGE_SUPPORT@
EXP_VIS_SUPPORT = @EXP_VIS_SUPPORT@
......@@ -12,6 +12,9 @@ SUBDIR = collab
include $(OBJDIR)/Makeconf
SUBDIRS = mailman cvstools jabber trac
ifeq ($(EXP_VIS_SUPPORT),1)
SUBDIRS += exp-vis
endif
all: all-subdirs
......@@ -31,6 +34,9 @@ post-install:
@$(MAKE) -C cvstools post-install
@$(MAKE) -C jabber post-install
@$(MAKE) -C trac post-install
ifeq ($(EXP_VIS_SUPPORT),1)
@$(MAKE) -C exp-vis post-install
endif
# How to recursively descend into subdirectories to make general
# targets such as `all'.
......
#
# EMULAB-COPYRIGHT
# Copyright (c) 2009 University of Utah and the Flux Group.
# All rights reserved.
#
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = ../..
SUBDIR = collab/exp-vis
include $(OBJDIR)/Makeconf
CGI_SCRIPTS = fetch-vis
LIBEXEC_SCRIPTS = write-vis-auth
CTRL_LIBEXEC_SCRIPTS = write-vis-auth.proxy
SETUID_LIBX_SCRIPTS = write-vis-auth
#
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
#
all: $(CGI_SCRIPTS) $(LIBEXEC_SCRIPTS) $(CTRL_LIBEXEC_SCRIPTS)
include $(TESTBED_SRCDIR)/GNUmakerules
install: \
$(addprefix $(INSTALL_LIBEXECDIR)/, $(LIBEXEC_SCRIPTS)) \
$(addprefix $(TBROOT)/opsdir/www/cgi-bin/, $(CGI_SCRIPTS)) \
$(addprefix $(INSTALL_DIR)/opsdir/libexec/, $(CTRL_LIBEXEC_SCRIPTS))
$(TBROOT)/opsdir/www/cgi-bin/fetch-vis: fetch-vis
-$(SUDO) mkdir -m 775 $(TBROOT)/opsdir/www/cgi-bin
$(SUDO) $(INSTALL) -o root -m 4775 $< $@
$(INSTALL_DIR)/opsdir/libexec/write-vis-auth.proxy: write-vis-auth.proxy
-mkdir -p $(INSTALL_DIR)/opsdir/libexec
$(INSTALL) $< $@
post-install:
clean:
#!/usr/bin/perl -T
#
#
#
use strict;
use warnings;
use POSIX qw(setuid setgid);
use Cwd qw(realpath);
use CGI;
use CGI::Cookie;
use HTTP::Date;
#use Data::Dumper;
#print "\n\n";
#print STDERR Dumper(\%ENV);
my $FSDIR_PROJ = "@FSDIR_PROJ@";
my $FSDIR_GROUPS = "@FSDIR_GROUPS@";
sub error($) {
print "Content-Type: text/plain\n";
print "Status: 404 Not Found\n\n";
print "$_[0]\n";
#die "$_[0]\n";
exit 1;
}
my $SCRIPT_URL = $ENV{REQUEST_URI};
# Parse URL
my ($proj,$group,$exp,$dir,$file);
local $_ = $SCRIPT_URL;
if (/^\/proj-vis\/([a-zA-Z0-9-]+)\/?(.*)$/) {
$proj = $1;
$group = $1;
$file = $2;
} elsif (/^\/group-vis\/([a-zA-Z0-9-]+)\/?([a-zA-Z0-9-]+)\/?(.*)$/) {
$proj = $1;
$group = $2;
$file = $3;
} elsif (/^\/exp-vis\/([a-zA-Z0-9-]+)\/?([a-zA-Z0-9-]+)\/?(.*)$/) {
$proj = $1;
$exp = $2;
$file = $3;
} else {
error("Malformed URL");
}
if (defined $exp) {
my $exp_dir = "/proj/$proj/exp/$exp";
local $_ = realpath $exp_dir;
if (/^$FSDIR_PROJ\/$proj\//) {
$group = $proj;
} elsif (/^$FSDIR_GROUPS\/$proj\/(.+?)\//) {
$group = $1;
}
$dir = "/groups/$proj/$group/www/exp-vis/$exp";
} else {
$dir = "/groups/$proj/$group/www/group-vis";
}
# Lookup up the Unix GID for the proj and the group
my (undef,undef,undef,undef,undef,$gid) = stat("/proj/$proj") or die;
my ($gid_name,undef,undef,$gid_members) = getgrgid($gid);
die "Error: Bad proj GID: $gid_name != $proj" unless $gid_name eq $proj;
my (undef,undef,undef,undef,undef,$gid2) = stat("/groups/$proj/$group") or die;
my ($gid2_name,undef,undef,$gid2_members) = getgrgid($gid2);
# For security remove any ".." from the path and abort if we would
# leave $dir
my @dirs = split /\//, $file;
my @res;
foreach my $d (@dirs) {
if ($d eq '' || $d eq '.') {
# nothing to do
} elsif ($d eq '..') {
error("Malformed URL") if @res == 0;
pop @res;
} else {
push @res, $d;
}
}
# Create the path
$file = join ('/', @res);
my $path = "$dir/$file";
if (-d $path) {
my $orig_path = $path;
$path .= "/index.html" if -e "$path/index.html";
$path .= "/index.htm" if -e "$path/index.htm";
error("Can't index dir: $path") unless $path ne $orig_path;
}
error("File Doesn't Exist: $path") unless -e $path;
# Make sure that the path, after resolving any symbolic links,
# still resides is /proj/<proj> or /groups/<proj>/<group>
my $realpath = realpath $path;
error("Invalid path: $realpath") unless $realpath =~ /^$FSDIR_PROJ\/$proj|^$FSDIR_GROUPS\/$proj\/$group/;
#
# Special rule for boss. Since we are bypassing authorization, don't
# show anything, just let boss know that the url is valid.
#
if ($ENV{REMOTE_ADDR} eq "@BOSSNODE_IP@") {
print "Content-Type: text/plain\n\n";
print "I exist!\n";
exit(0);
}
#
# Get session cookie and make sure user is logged in and authorized to
# view.
#
my %cookies = raw_fetch CGI::Cookie;
my $session_key = $cookies{exp_vis_session};
error("Not logged in.") unless defined $session_key;
my $user;
open F, "/var/run/exp-vis.auth" or die;
foreach (<F>) {
chop;
my ($key, $u) = split / /;
if ($key eq $session_key) {
$user = $u;
last;
}
}
error("Login Timed Out.") unless defined $user;
my (undef, undef, $uid, $user_gid) = getpwnam($user);
die if $user_gid == 0;
error("You do not have permission to view $proj files")
unless $gid == $user_gid || grep {$_ eq $user} split /\s+/, $gid_members;
error("You do not have permission to view $proj/$group files")
unless $gid2 == $user_gid || grep {$_ eq $user} split /\s+/, $gid2_members;
# OK, Now we are sure the user has permission to view this file.
# Now become a member of the GID for the proj and group and clear out
# any other GIDs
undef $!;
setgid($gid);
$) = "$gid $gid $gid2";
die $! if $!;
# Now drop privileges, using setuid to make sure the saved uid
# is also changes, ie, so that the change is permanent.
setuid($<) or die $!;
my %mime_map =
qw(html text/html htm text/html
txt text/plain
png image/png
gif image/gif
jpg image/jpeg jpeg image/jpeg
zip application/zip);
my ($ext) = $path =~ /\.([^.]+)$/;
$ext = lc $ext;
my $mime_type = $mime_map{$ext};
$/ = undef;
open F, "$path" or error "Can't read file: $path";
my ($dev,$ino,$mode,$nlink,undef,undef,$rdev,$size,
$atime,$mtime,$ctime,$blksize,$blocks) = stat F;
my $if_mod_since = 0;
$if_mod_since = str2time($ENV{HTTP_IF_MODIFIED_SINCE})
if defined $ENV{HTTP_IF_MODIFIED_SINCE};
if ($if_mod_since > 0 && $if_mod_since <= $mtime) {
print "Status: 304 Not Modified\n\n";
} else {
print "Content-Type: $mime_type\n" if defined $mime_type;
print "Content-Length: ", $size, "\n";
print "Last-Modified: ", time2str($mtime), "\n";
print "\n";
print <F> unless $ENV{REQUEST_METHOD} eq 'HEAD';
}
exit 0;
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2007 University of Utah and the Flux Group.
# All rights reserved.
#
use strict;
use Getopt::Std;
#
# Configure variables
#
my $TB = "@prefix@";
my $TBOPS = "@TBOPSEMAIL@";
my $USERNODE = "@USERNODE@";
my $SSH = "$TB/bin/sshtb -l root -host $USERNODE";
my $background = 0;
# un-taint path
$ENV{'PATH'} = '/bin:/usr/bin:/usr/local/bin';
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
# Turn off line buffering on output
$| = 1;
#
# Capture stdout and stderr to a file so if we die we can mail the output to
# testbed-ops
#
# XXX: Don't hardcode
my $logfile = "/tmp/write-vis-auth.$$";
use vars qw(*OLDOUT *OLDERR);
open OLDOUT, ">&STDOUT" or die "Can't dup STDOUT $!";
open OLDERR, ">&STDERR" or die "Can't dup STDERR $!";
open STDOUT, ">$logfile" or die "Can't open $logfile: $!";
open STDERR, ">&STDOUT" or die "Can't dup STDERR $!";
$SIG{__DIE__} = sub {
return unless defined $^S; # In Parser
return if $^S; # In Eval Block
local $_ = $_[0];
open STDOUT, ">&OLDOUT";
open STDERR, ">&OLDERR";
SENDMAIL($TBOPS, "write-vis-auth failed", $_, undef, undef, $logfile);
unlink $logfile;
TBScriptUnlock();
print STDERR "write-vis-auth failed, see testbed-ops mail\n";
exit(1);
};
#
# Load the Testbed support stuff.
#
use lib "@prefix@/lib";
use libdb;
use libtestbed;
if ((my $locked = TBScriptLock("write-vis-auth", 1)) != TBSCRIPTLOCK_OKAY()) {
exit(0)
if ($locked == TBSCRIPTLOCK_IGNORE);
die("Could not get the lock after a long time!\n");
}
# become root, needed for ssh
$< = $>;
my $db_result =
DBQueryFatal("select opskey, uid from login");
open O, "| $SSH $TB/libexec/write-vis-auth.proxy"
or die "ssh to ops failed: $!\n";
my $prev_opskey = '';
while (my ($opskey,$uid) = $db_result->fetchrow_array) {
$opskey = "00000000000000000000000000000000" if $opskey eq '';
print O "$opskey $uid\n";
}
close O;
die "ssh to ops failed: $!\n" if $!;
die "ssh to ops failed with exit code $?\n" if $? != 0;
unlink $logfile;
TBScriptUnlock();
exit(0);
#!/bin/sh
set -e
if [ "$USER" != "root" ]; then
echo "Must be root." 1>&2
exit 1
fi
TEMPFILE=`mktemp /var/run/exp-vis.XXXXXX`
cat > $TEMPFILE
mv $TEMPFILE /var/run/exp-vis.auth
......@@ -1495,6 +1495,8 @@ done
......@@ -1582,6 +1584,7 @@ PROTOGENI_CLEARINGHOUSE=0
PROTOGENI_DOMAIN="unknown"
STANDALONE_CLEARINGHOUSE=0
NODE_USAGE_SUPPORT=0
EXP_VIS_SUPPORT=0
NOSTACKMIB=0
#
......@@ -2192,17 +2195,17 @@ for ac_hdr in ulxmlrpcpp/ulxr_config.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2195: checking for $ac_hdr" >&5
echo "configure:2199: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2200 "configure"
#line 2204 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -2241,17 +2244,17 @@ for ac_hdr in linux/videodev.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2244: checking for $ac_hdr" >&5
echo "configure:2248: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2249 "configure"
#line 2253 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -2284,7 +2287,7 @@ done
# Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2287: checking for $ac_word" >&5
echo "configure:2291: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GTK_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -2341,7 +2344,7 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
echo "configure:2344: checking how to run the C++ preprocessor" >&5
echo "configure:2348: checking how to run the C++ preprocessor" >&5
if test -z "$CXXCPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -2354,12 +2357,12 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
cross_compiling=$ac_cv_prog_cxx_cross
CXXCPP="${CXX-g++} -E"
cat > conftest.$ac_ext <<EOF
#line 2357 "configure"
#line 2361 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
......@@ -2385,17 +2388,17 @@ echo "$ac_t""$CXXCPP" 1>&6
ac_safe=`echo "xercesc/dom/DOM.hpp" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for xercesc/dom/DOM.hpp""... $ac_c" 1>&6
echo "configure:2388: checking for xercesc/dom/DOM.hpp" >&5
echo "configure:2392: checking for xercesc/dom/DOM.hpp" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2393 "configure"
#line 2397 "configure"
#include "confdefs.h"
#include <xercesc/dom/DOM.hpp>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -2459,7 +2462,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:2462: checking for a BSD compatible install" >&5
echo "configure:2466: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -2520,7 +2523,7 @@ esac
# Extract the first word of "rsync", so it can be a program name with args.
set dummy rsync; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2523: checking for $ac_word" >&5
echo "configure:2527: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_RSYNC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -2771,6 +2774,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
collab/cvstools/cvs.proxy collab/cvstools/cvs_ctrl \
collab/cvstools/cvsrepo_ctrl.proxy collab/cvstools/cvsrepo_ctrl \
collab/cvstools/webcvsrepo_ctrl \
collab/exp-vis/GNUmakefile collab/exp-vis/fetch-vis \
node_usage/GNUmakefile node_usage/mk-plots \
node_usage/analy node_usage/publish \
node_usage/analy2 node_usage/refresh \
......@@ -3059,6 +3063,7 @@ s%@STANDALONE_CLEARINGHOUSE@%$STANDALONE_CLEARINGHOUSE%g
s%@GMAP_API_KEY@%$GMAP_API_KEY%g
s%@NODE_USAGE_SUPPORT@%$NODE_USAGE_SUPPORT%g
s%@NOSTACKMIB@%$NOSTACKMIB%g
s%@EXP_VIS_SUPPORT@%$EXP_VIS_SUPPORT%g
s%@TBOPSEMAIL@%$TBOPSEMAIL%g
s%@TBOPSEMAIL_NOSLASH@%$TBOPSEMAIL_NOSLASH%g
s%@TBROBOCOPSEMAIL@%$TBROBOCOPSEMAIL%g
......
......@@ -217,6 +217,7 @@ AC_SUBST(STANDALONE_CLEARINGHOUSE)
AC_SUBST(GMAP_API_KEY)
AC_SUBST(NODE_USAGE_SUPPORT)
AC_SUBST(NOSTACKMIB)
AC_SUBST(EXP_VIS_SUPPORT)
#
# Offer both versions of the email addresses that have the @ escaped
......@@ -302,6 +303,7 @@ PROTOGENI_CLEARINGHOUSE=0
PROTOGENI_DOMAIN="unknown"
STANDALONE_CLEARINGHOUSE=0
NODE_USAGE_SUPPORT=0
EXP_VIS_SUPPORT=0
NOSTACKMIB=0
#
......@@ -1017,6 +1019,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
collab/cvstools/cvs.proxy collab/cvstools/cvs_ctrl \
collab/cvstools/cvsrepo_ctrl.proxy collab/cvstools/cvsrepo_ctrl \
collab/cvstools/webcvsrepo_ctrl \
collab/exp-vis/GNUmakefile collab/exp-vis/fetch-vis \
node_usage/GNUmakefile node_usage/mk-plots \
node_usage/analy node_usage/publish \
node_usage/analy2 node_usage/refresh \
......
......@@ -11,6 +11,8 @@ UNIFIED = @UNIFIED_BOSS_AND_OPS@
include $(OBJDIR)/Makeconf
SUBBOSS_BIN_SCRIPTS = subboss_dhcpd_makeconf
BIN_SCRIPTS = nalloc nfree nodeip readycount subboss_dhcpd_makeconf
SBIN_SCRIPTS = avail inuse showgraph if2port backup webcontrol node_status \
genelists genelists.proxy dhcpd_makeconf nodelog unixgroups \
......@@ -50,6 +52,8 @@ TARGETS = emdb.pm emutil.pm emdbi.pm
SETUID_SBIN_SCRIPTS =
endif
$(SUBBOSS_BIN_SCRIPTS):
#
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
......@@ -64,6 +68,8 @@ else
install: clrhouse-install
endif
subboss-install: $(addprefix $(INSTALL_BINDIR)/, $(SUBBOSS_BIN_SCRIPTS))
boss-install: $(addprefix $(INSTALL_BINDIR)/, $(BIN_SCRIPTS)) \
$(addprefix $(INSTALL_SBINDIR)/, $(SBIN_SCRIPTS)) \
$(addprefix $(INSTALL_LIBDIR)/, $(LIB_SCRIPTS)) \
......
......@@ -66,6 +66,7 @@ OPSDBSUPPORT=1
PELABSUPPORT=1
PLABSUPPORT=1
PLAB_ROOTBALL="plabroot-21.tar.bz2"
EXP_VIS_SUPPORT=1
# Do not turn this on unless you talk to Utah first!
PROTOGENI_SUPPORT=1
# If you are not the main Emulab site in Utah, change this!
......
......@@ -18,6 +18,24 @@ Note that some instructions may have steps that need to occur at a few
different points in the install process - these are marked with the
earliest time one of the steps needs to occur.
20100507: After install
Minor change to apache.conf, so you need to install that and
restart apache.
boss> cd /your/obj/tree/apache
boss> gmake
To be safe, you should backup your existing config file, and
then install the new one.
boss> cp /usr/local/etc/apache/httpd.conf ~/httpd.conf
boss> sudo gmake install
And restart apache if its currently running.
boss> sudo /usr/local/etc/rc.d/apache.sh restart
20100108: After install:
Change to how stated does it logging. In /etc/newsyslog.conf,
......
......@@ -271,7 +271,7 @@ sub GetAdvertisement($$)
my ($available, $pc) = @_;
my $xml = undef;
my $invocation = "$PTOPGEN -x -g 0.1 -r -p GeniSlices";
my $invocation = "$PTOPGEN -x -g 0.2 -r -p GeniSlices";
$invocation .= " -a" unless $available;
if (defined($pc)) {
$invocation .= " -1 $pc";
......@@ -1003,7 +1003,7 @@ sub GetTicketAuxAux($$$$$$$$$)
my @interfaces = GeniXML::FindNodes("n:linkendpoints | ".
"n:interface_ref",
$linkref)->get_nodelist();
my %managers = undef;
my %managers = ();
my $ifacenum = 1;
my $trivial_ok = 0;
......
......@@ -308,9 +308,13 @@ sub CreateSliver($)
return $rspec
if (GeniResponse::IsResponse($rspec));
# Make sure that the next phase sees all changes.
Experiment->FlushAll();
Node->FlushAll();
my $response = GeniCM::SliverWorkAux($credential,
$rspec, $keys, 0, $impotent, 1, 0);
if (GeniResponse::IsError($response)) {
#
# We have to make sure there is nothing left over since there
......@@ -347,6 +351,10 @@ sub CreateSliver($)
return GeniResponse->Create(GENIRESPONSE_ERROR, undef,
"Internal Error");
}
# Make sure that the next phase sees all changes.
Experiment->FlushAll();
Node->FlushAll();
if ($aggregate->Start($API_VERSION, 0) != 0) {
return GeniResponse->Create(GENIRESPONSE_ERROR, undef,
"Could not start sliver");
......
......@@ -132,13 +132,16 @@ if( $? == -1 ) {
die( "refusing to overwrite $originalfile" );
rename( "$TB/etc/emulab.pem", "$originalfile" ) or
die( "could not rename root certificate" );
my $serial = TBGetUniqueIndex( "user_sslcerts" );
# Save the new certificate to a temporary file: OpenSSL will reuse the
# plain text from the old certificate instead of the current version,
# so we regenerate the whole thing once we've finished to avoid
# horrible confusion.
system( "$OPENSSL x509 -days 2000 -text -extfile $extfile " .
"-signkey $TB/etc/emulab.key < $originalfile " .
"> $TB/etc/emulab.tmp" );
"-set_serial $serial -signkey $TB/etc/emulab.key " .
"< $originalfile > $TB/etc/emulab.tmp" );
# For some reason, OpenSSL can return non-zero even when the certificate
# generation succeeded. Check the output file instead.
if( !( -s "$TB/etc/emulab.tmp" ) ) {
......
......@@ -860,6 +860,7 @@ REPLACE INTO table_regex VALUES ('node_types','node_type','text','regex','^[-\\w
REPLACE INTO table_regex VALUES ('node_types','class','text','regex','^[\\w]+$',1,30,NULL);
REPLACE INTO table_regex VALUES ('node_types','isvirtnode','text','redirect','default:boolean',0,0,NULL);
REPLACE INTO table_regex VALUES ('node_types','isjailed','text','redirect','default:boolean',0,0,NULL);
REPLACE INTO table_regex VALUES ('node_types','isswitch','text','redirect','default:boolean',0,0,NULL);