Commit c1c1bce2 authored by Mike Hibler's avatar Mike Hibler

Support for no shared filesystem (unsupport for shared filesystem?) and

(eventual) support for NFS servers without race conditions!

This means no NFS between nodes and ops/fs. There are still NFS mounts of
ops on boss however.

Added new defs-* variable NOSHAREDFS, which when set non-zero will disable
the export of NFS filesystems to nodes.  Involved lots of little changes:

 * /users, /proj, and /share filesystems are not exported to nodes.

 * Returned mount info now includes an FSTYPE key which will be set to "LOCAL"
   if NOSHAREDFS is in effect (by default it is set to "NFS-RACY"; more on
   this later).  In the case where it is set to LOCAL, the other mount lines
   no longer contain REMOTE=foo settings.  Because of this change,
   THE TMCD VERSION NUMBER HAS BEEN BUMPED TO 32.

 * The client rc.mounts script will now create local versions of /users/*,
   /proj/<pid>, and /share when FSTYPE=LOCAL.  It first runs mkextrafs to
   create a large partition for these, since someday we will likely want
   to pre-populate these with a non-trivial amount of data.  Right now,
   the only thing that is put in the user's homedir is the standard dotfiles
   for the OS and the Emulab authorized_keys file (so you can login).

 * Linktest had to be modified to fetch the various results files (via
   loghole) rather than just assuming they were in /proj.  And also changed
   to invoke tevc with the local copy of the event key so it won't try to
   read it over NFS.

 * create_image was modified to ssh to the node and run the imagezip
   command, capturing the output of ssh.  This is controlled via the "-s"
   option which defaults to on for a NOSHAREDFS system, but can also be
   used on a normal system.

 * elabinelab's can be configured with/without a shared FS via the
   CONFIG_SHAREDFS attribute (note polarity change) which defaults to 1.

Another new defs-* variable, NFSRACY, will some day allow you to specify
(by setting to 0) that your NFS server does NOT have the nefarious mountd
race condition when changing /etc/exports.  Currently, this defaults to 1
since all versions of FreeBSD supported as an "fs" node have this "feature."
Rumor has it that FreeBSD 8 does not have this problem nor, presumably,
would a Linux NFS server.

The only use of this variable right now is to set the FSTYPE returned by the
tmcd "mounts" call, which in turn is used by one client script, rc.topomap
(via a libsetup function) to determine whether it should try copying
the topo file multiple times.

Random: add python2.6 to list of python's checked for in configure.
Random: resync defs-example-privatecnet with defs-example.
Random: did a little code-pissin here and there.
parent 437cc337
...@@ -44,6 +44,8 @@ ...@@ -44,6 +44,8 @@
#undef ISOLATEADMINS #undef ISOLATEADMINS
#undef DYNAMICROOTPASSWORDS #undef DYNAMICROOTPASSWORDS
#undef TPM #undef TPM
#undef NOSHAREDFS
#undef NFSRACY
#undef HAVE_SRANDOMDEV #undef HAVE_SRANDOMDEV
......
...@@ -627,7 +627,7 @@ fi ...@@ -627,7 +627,7 @@ fi
CPPFLAGS="-I/usr/local/include" CPPFLAGS="-I/usr/local/include"
# BEGIN Python detection. # BEGIN Python detection.
for ac_prog in python python2.4 python2.3 python2.2 for ac_prog in python python2.6 python2.5 python2.4 python2.3 python2.2
do do
# Extract the first word of "$ac_prog", so it can be a program name with args. # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2 set dummy $ac_prog; ac_word=$2
...@@ -1498,6 +1498,8 @@ done ...@@ -1498,6 +1498,8 @@ done
...@@ -1588,6 +1590,8 @@ STANDALONE_CLEARINGHOUSE=0 ...@@ -1588,6 +1590,8 @@ STANDALONE_CLEARINGHOUSE=0
NODE_USAGE_SUPPORT=0 NODE_USAGE_SUPPORT=0
EXP_VIS_SUPPORT=0 EXP_VIS_SUPPORT=0
NOSTACKMIB=0 NOSTACKMIB=0
NOSHAREDFS=0
NFSRACY=1
SELFLOADER_DATA="__DATA__" SELFLOADER_DATA="__DATA__"
# #
...@@ -1820,7 +1824,18 @@ if test $TPM -eq 1; then ...@@ -1820,7 +1824,18 @@ if test $TPM -eq 1; then
EOF EOF
fi fi
if test $NOSHAREDFS -eq 1; then
cat >> confdefs.h <<EOF
#define NOSHAREDFS 1
EOF
fi
if test $NFSRACY -eq 1; then
cat >> confdefs.h <<EOF
#define NFSRACY 1
EOF
fi
LOG_TESTBED=`echo "LOG_$TBLOGFACIL" | tr a-z A-Z` LOG_TESTBED=`echo "LOG_$TBLOGFACIL" | tr a-z A-Z`
cat >> confdefs.h <<EOF cat >> confdefs.h <<EOF
...@@ -2198,7 +2213,6 @@ EOF ...@@ -2198,7 +2213,6 @@ EOF
fi fi
# #
# Check for ulsshxmlrpc header # Check for ulsshxmlrpc header
# #
...@@ -2207,17 +2221,17 @@ for ac_hdr in ulxmlrpcpp/ulxr_config.h ...@@ -2207,17 +2221,17 @@ for ac_hdr in ulxmlrpcpp/ulxr_config.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2201: checking for $ac_hdr" >&5 echo "configure:2226: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2206 "configure" #line 2231 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:2236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -2256,17 +2270,17 @@ for ac_hdr in linux/videodev.h ...@@ -2256,17 +2270,17 @@ for ac_hdr in linux/videodev.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2250: checking for $ac_hdr" >&5 echo "configure:2275: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2255 "configure" #line 2280 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:2285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -2299,7 +2313,7 @@ done ...@@ -2299,7 +2313,7 @@ done
# Extract the first word of "gtk-config", so it can be a program name with args. # Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2 set dummy gtk-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2293: checking for $ac_word" >&5 echo "configure:2318: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GTK_CONFIG'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_GTK_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2356,7 +2370,7 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes ...@@ -2356,7 +2370,7 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
cross_compiling=$ac_cv_prog_cxx_cross cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
echo "configure:2350: checking how to run the C++ preprocessor" >&5 echo "configure:2375: checking how to run the C++ preprocessor" >&5
if test -z "$CXXCPP"; then if test -z "$CXXCPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -2369,12 +2383,12 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes ...@@ -2369,12 +2383,12 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
cross_compiling=$ac_cv_prog_cxx_cross cross_compiling=$ac_cv_prog_cxx_cross
CXXCPP="${CXX-g++} -E" CXXCPP="${CXX-g++} -E"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2363 "configure" #line 2388 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdlib.h> #include <stdlib.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:2393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
...@@ -2400,17 +2414,17 @@ echo "$ac_t""$CXXCPP" 1>&6 ...@@ -2400,17 +2414,17 @@ echo "$ac_t""$CXXCPP" 1>&6
ac_safe=`echo "xercesc/dom/DOM.hpp" | sed 'y%./+-%__p_%'` ac_safe=`echo "xercesc/dom/DOM.hpp" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for xercesc/dom/DOM.hpp""... $ac_c" 1>&6 echo $ac_n "checking for xercesc/dom/DOM.hpp""... $ac_c" 1>&6
echo "configure:2394: checking for xercesc/dom/DOM.hpp" >&5 echo "configure:2419: checking for xercesc/dom/DOM.hpp" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2399 "configure" #line 2424 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <xercesc/dom/DOM.hpp> #include <xercesc/dom/DOM.hpp>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:2429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -2474,7 +2488,7 @@ fi ...@@ -2474,7 +2488,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh. # ./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 $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:2468: checking for a BSD compatible install" >&5 echo "configure:2493: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -2535,7 +2549,7 @@ esac ...@@ -2535,7 +2549,7 @@ esac
# Extract the first word of "rsync", so it can be a program name with args. # Extract the first word of "rsync", so it can be a program name with args.
set dummy rsync; ac_word=$2 set dummy rsync; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2529: checking for $ac_word" >&5 echo "configure:2554: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_RSYNC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_RSYNC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -3104,6 +3118,7 @@ s%@GMAP_API_KEY@%$GMAP_API_KEY%g ...@@ -3104,6 +3118,7 @@ s%@GMAP_API_KEY@%$GMAP_API_KEY%g
s%@NODE_USAGE_SUPPORT@%$NODE_USAGE_SUPPORT%g s%@NODE_USAGE_SUPPORT@%$NODE_USAGE_SUPPORT%g
s%@NOSTACKMIB@%$NOSTACKMIB%g s%@NOSTACKMIB@%$NOSTACKMIB%g
s%@EXP_VIS_SUPPORT@%$EXP_VIS_SUPPORT%g s%@EXP_VIS_SUPPORT@%$EXP_VIS_SUPPORT%g
s%@NOSHAREDFS@%$NOSHAREDFS%g
s%@SELFLOADER_DATA@%$SELFLOADER_DATA%g s%@SELFLOADER_DATA@%$SELFLOADER_DATA%g
s%@TBOPSEMAIL@%$TBOPSEMAIL%g s%@TBOPSEMAIL@%$TBOPSEMAIL%g
s%@TBOPSEMAIL_NOSLASH@%$TBOPSEMAIL_NOSLASH%g s%@TBOPSEMAIL_NOSLASH@%$TBOPSEMAIL_NOSLASH%g
......
...@@ -58,7 +58,7 @@ AC_SUBST(PATH) ...@@ -58,7 +58,7 @@ AC_SUBST(PATH)
CPPFLAGS="-I/usr/local/include" CPPFLAGS="-I/usr/local/include"
# BEGIN Python detection. # BEGIN Python detection.
AC_PATH_PROGS(PYTHON, python python2.4 python2.3 python2.2) AC_PATH_PROGS(PYTHON, python python2.6 python2.5 python2.4 python2.3 python2.2)
if test x"$PYTHON" = x""; then if test x"$PYTHON" = x""; then
AC_MSG_ERROR([python not detected]) AC_MSG_ERROR([python not detected])
...@@ -219,6 +219,7 @@ AC_SUBST(GMAP_API_KEY) ...@@ -219,6 +219,7 @@ AC_SUBST(GMAP_API_KEY)
AC_SUBST(NODE_USAGE_SUPPORT) AC_SUBST(NODE_USAGE_SUPPORT)
AC_SUBST(NOSTACKMIB) AC_SUBST(NOSTACKMIB)
AC_SUBST(EXP_VIS_SUPPORT) AC_SUBST(EXP_VIS_SUPPORT)
AC_SUBST(NOSHAREDFS)
AC_SUBST(SELFLOADER_DATA) AC_SUBST(SELFLOADER_DATA)
# #
...@@ -308,6 +309,8 @@ STANDALONE_CLEARINGHOUSE=0 ...@@ -308,6 +309,8 @@ STANDALONE_CLEARINGHOUSE=0
NODE_USAGE_SUPPORT=0 NODE_USAGE_SUPPORT=0
EXP_VIS_SUPPORT=0 EXP_VIS_SUPPORT=0
NOSTACKMIB=0 NOSTACKMIB=0
NOSHAREDFS=0
NFSRACY=1
SELFLOADER_DATA="__DATA__" SELFLOADER_DATA="__DATA__"
# #
...@@ -425,7 +428,12 @@ fi ...@@ -425,7 +428,12 @@ fi
if test $TPM -eq 1; then if test $TPM -eq 1; then
AC_DEFINE_UNQUOTED(TPM, 1) AC_DEFINE_UNQUOTED(TPM, 1)
fi fi
if test $NOSHAREDFS -eq 1; then
AC_DEFINE_UNQUOTED(NOSHAREDFS, 1)
fi
if test $NFSRACY -eq 1; then
AC_DEFINE_UNQUOTED(NFSRACY, 1)
fi
LOG_TESTBED=`echo "LOG_$TBLOGFACIL" | tr a-z A-Z` LOG_TESTBED=`echo "LOG_$TBLOGFACIL" | tr a-z A-Z`
AC_DEFINE_UNQUOTED(LOG_TESTBED, $LOG_TESTBED) AC_DEFINE_UNQUOTED(LOG_TESTBED, $LOG_TESTBED)
...@@ -746,7 +754,6 @@ else ...@@ -746,7 +754,6 @@ else
AC_DEFINE_UNQUOTED(WINSUPPORT, 1) AC_DEFINE_UNQUOTED(WINSUPPORT, 1)
fi fi
# #
# Check for ulsshxmlrpc header # Check for ulsshxmlrpc header
# #
......
...@@ -42,6 +42,13 @@ WINSUPPORT=1 ...@@ -42,6 +42,13 @@ WINSUPPORT=1
ELVIN_COMPAT=1 ELVIN_COMPAT=1
NSVERIFY=1 NSVERIFY=1
# Set to one to disable exporting NFS filesystems to nodes
NOSHAREDFS=0
# Set to one if you are using an NFS server that has an exports race
# If you don't know what this means, leave it at one, it won't hurt
NFSRACY=1
# #
# If enabled, needs setup, see: # If enabled, needs setup, see:
# http://users.emulab.net/trac/emulab/wiki/NodeUsageInstall # http://users.emulab.net/trac/emulab/wiki/NodeUsageInstall
......
...@@ -40,6 +40,7 @@ MAILMANSUPPORT=changeme ...@@ -40,6 +40,7 @@ MAILMANSUPPORT=changeme
OPSDBSUPPORT=changeme OPSDBSUPPORT=changeme
WINSUPPORT=0 WINSUPPORT=0
NSVERIFY=changeme NSVERIFY=changeme
NOSHAREDFS=changeme
SFSSUPPORT=0 SFSSUPPORT=0
CVSSUPPORT=changeme CVSSUPPORT=changeme
NFSTRACESUPPORT=0 NFSTRACESUPPORT=0
......
...@@ -217,6 +217,22 @@ WINSUPPORT=0 ...@@ -217,6 +217,22 @@ WINSUPPORT=0
# #
NSVERIFY=1 NSVERIFY=1
#
# Turn this on to disable exporting NFS filesystems to nodes.
# User home directories on all nodes will be local and unsynchronized in
# this case. There will also be no access to a central /proj, /group or
# /share either.
#
NOSHAREDFS=0
#
# Set to one if you are using an NFS server that has an "exports race".
# FreeBSDs before 8.x have this condition. FreeBSD 8 and above (and
# probably newer Linuxes) do not. Since we currently only support FreeBSD
# 7.x and below fileservers, leave this at one.
#
NFSRACY=1
# #
# Virtual node network configuration (if you don't want virtual nodes, # Virtual node network configuration (if you don't want virtual nodes,
# just leave this as is) # just leave this as is)
......
...@@ -224,6 +224,22 @@ WINSUPPORT=0 ...@@ -224,6 +224,22 @@ WINSUPPORT=0
# #
NSVERIFY=1 NSVERIFY=1
#
# Turn this on to disable exporting NFS filesystems to nodes.
# User home directories on all nodes will be local and unsynchronized in
# this case. There will also be no access to a central /proj, /group or
# /share either.
#
NOSHAREDFS=0
#
# Set to one if you are using an NFS server that has an "exports race".
# FreeBSDs before 8.x have this condition. FreeBSD 8 and above (and
# probably newer Linuxes) do not. Since we currently only support FreeBSD
# 7.x and below fileservers, leave this at one.
#
NFSRACY=1
# #
# Virtual node network configuration (if you don't want virtual nodes, # Virtual node network configuration (if you don't want virtual nodes,
# just leave this as is) # just leave this as is)
...@@ -243,6 +259,25 @@ VIRTNODE_NETMASK=255.240.0.0 ...@@ -243,6 +259,25 @@ VIRTNODE_NETMASK=255.240.0.0
JAILIPBASE=$VIRTNODE_NETWORK JAILIPBASE=$VIRTNODE_NETWORK
JAILIPMASK=$VIRTNODE_NETMASK JAILIPMASK=$VIRTNODE_NETMASK
#
# Selective disable of a couple of features.
#
# DISABLE_NAMED_SETUP If you are not running a name server on your boss.
# This will prevent you from using the virtual node
# names (e.g., node1.eid.pid.<your-domain>).
#
# DISABLE_EXPORTS_SETUP Prevent dynamic configuration of the exports file
# on your "fs" node. You will need to use this if
# your fs node is not running FreeBSD or is otherwise
# not under your control. If you set this option, you
# will need to ensure that ALL your Emulab filesystems
# (e.g., /proj, /users) are exported to ALL your nodes.
# This has obvious security implications and YOU REALLY
# SHOULD NOT DO THIS.
#
DISABLE_NAMED_SETUP=0
DISABLE_EXPORTS_SETUP=0
# #
# Only supported on the Mother Ship (emulab.net) right now. # Only supported on the Mother Ship (emulab.net) right now.
# #
...@@ -274,3 +309,9 @@ FRISEBEEMCASTPORT=3564 ...@@ -274,3 +309,9 @@ FRISEBEEMCASTPORT=3564
# Sometimes the main page is down in a directory on WWWHOST # Sometimes the main page is down in a directory on WWWHOST
# No trailing '/'! # No trailing '/'!
#WWW=www.example.emulab.net/emulab-www #WWW=www.example.emulab.net/emulab-www
# Some switches do not support the stack MIB. This means snmpit cannot
# set the port/duplex during swapin, so youare stuck at a particular
# bandwidth, and have to change them from the console. Set to 1 if
# your switch has no stack MIB.
NOSTACKMIB=0
/* /*
* EMULAB-COPYRIGHT * EMULAB-COPYRIGHT
* Copyright (c) 2000-2007 University of Utah and the Flux Group. * Copyright (c) 2000-2010 University of Utah and the Flux Group.
* All rights reserved. * All rights reserved.
*/ */
...@@ -36,6 +36,7 @@ static char *pideid; ...@@ -36,6 +36,7 @@ static char *pideid;
static char *swapper; static char *swapper;
static event_handle_t handle; static event_handle_t handle;
static unsigned long token = ~0; static unsigned long token = ~0;
static char *nodelocal_dir;
static void callback(event_handle_t handle, static void callback(event_handle_t handle,
event_notification_t notification, void *data); event_notification_t notification, void *data);
...@@ -52,7 +53,7 @@ usage(char *progname) ...@@ -52,7 +53,7 @@ usage(char *progname)
{ {
fprintf(stderr, fprintf(stderr,
"Usage: %s [-d] " "Usage: %s [-d] "
"[-s server] [-p port] [-k keyfile] [-l logfile] [-u user] -e pid/eid\n", "[-s server] [-p port] [-k keyfile] [-l logfile] [-u user] [-N dir] -e pid/eid\n",
progname); progname);
exit(-1); exit(-1);
} }
...@@ -74,7 +75,7 @@ main(int argc, char **argv) { ...@@ -74,7 +75,7 @@ main(int argc, char **argv) {
progname = argv[0]; progname = argv[0];
while ((c = getopt(argc, argv, "s:p:e:l:dk:i:Vu:")) != -1) { while ((c = getopt(argc, argv, "s:p:e:l:dk:i:Vu:N:")) != -1) {
switch (c) { switch (c) {
case 'd': case 'd':
debug++; debug++;
...@@ -100,6 +101,9 @@ main(int argc, char **argv) { ...@@ -100,6 +101,9 @@ main(int argc, char **argv) {
case 'u': case 'u':
swapper = optarg; swapper = optarg;
break; break;
case 'N':
nodelocal_dir = optarg;
break;
case 'V': case 'V':
fprintf(stderr, "%s\n", build_info); fprintf(stderr, "%s\n", build_info);
exit(0); exit(0);
...@@ -347,6 +351,7 @@ start_callback(event_handle_t handle, ...@@ -347,6 +351,7 @@ start_callback(event_handle_t handle,
static void static void
exec_linktest(char *args, int buflen) { exec_linktest(char *args, int buflen) {
char *word, *argv[MAX_ARGS], swapperarg[128], tokenarg[32]; char *word, *argv[MAX_ARGS], swapperarg[128], tokenarg[32];
char logdirarg[128];
int i,res; int i,res;
/* /*
...@@ -355,14 +360,18 @@ exec_linktest(char *args, int buflen) { ...@@ -355,14 +360,18 @@ exec_linktest(char *args, int buflen) {
*/ */
word = strtok(args," \t"); word = strtok(args," \t");
i=1; i=1;
sprintf(swapperarg, "SWAPPER=%s", swapper); snprintf(swapperarg, sizeof(swapperarg), "SWAPPER=%s", swapper);
argv[i++] = swapperarg; argv[i++] = swapperarg;
sprintf(tokenarg, "TOKEN=%lu", token); snprintf(tokenarg, sizeof(tokenarg), "TOKEN=%lu", token);
argv[i++] = tokenarg; argv[i++] = tokenarg;
if (nodelocal_dir) {
snprintf(logdirarg, sizeof(logdirarg),
"SHAREDDIR=0 LOGDIR=%s", nodelocal_dir);
argv[i++] = logdirarg;
}
do { do {
argv[i++] = word; argv[i++] = word;
} while ((word = strtok(NULL," \t")) } while ((word = strtok(NULL," \t")) && (i<MAX_ARGS));
&& (i<MAX_ARGS));
argv[i] = NULL; argv[i] = NULL;
argv[0] = LINKTEST_SCRIPT; argv[0] = LINKTEST_SCRIPT;
...@@ -376,7 +385,7 @@ exec_linktest(char *args, int buflen) { ...@@ -376,7 +385,7 @@ exec_linktest(char *args, int buflen) {
/* /*
* Execute the script with the arguments from the event * Execute the script with the arguments from the event
*/ */
res = execv( LINKTEST_SCRIPT,argv); res = execv(LINKTEST_SCRIPT, argv);
if(res < 0) { if(res < 0) {
error("Could not execute the Linktest script."); error("Could not execute the Linktest script.");
return; return;
......
...@@ -237,6 +237,7 @@ our $PROJDIR = "/proj"; ...@@ -237,6 +237,7 @@ our $PROJDIR = "/proj";
our $LOGRUN = ""; our $LOGRUN = "";
our $LOGDIR = ""; our $LOGDIR = "";
our $SHAREDDIR = "";
our $EVENTSERVER = ""; our $EVENTSERVER = "";
our $EVENTID = ""; our $EVENTID = "";
...@@ -276,6 +277,9 @@ foreach my $arg (@ARGV) { ...@@ -276,6 +277,9 @@ foreach my $arg (@ARGV) {
if($arg =~ /LOGRUN=(.+)/) { if($arg =~ /LOGRUN=(.+)/) {
$LOGRUN = $1; $LOGRUN = $1;
} }
if($arg =~ /SHAREDDIR=(.+)/) {
$SHAREDDIR = $1;
}
if($arg =~ /LOGDIR=(.+)/) { if($arg =~ /LOGDIR=(.+)/) {
$LOGDIR = $1; $LOGDIR = $1;
} }
...@@ -397,7 +401,7 @@ if (@hosts > 0 && (!$synserv || !exists($hostmap{$synserv}))) { ...@@ -397,7 +401,7 @@ if (@hosts > 0 && (!$synserv || !exists($hostmap{$synserv}))) {
# If the current node is the special node, do some housekeeping # If the current node is the special node, do some housekeeping
# and initialize the barrier count. # and initialize the barrier count.
# #
if(&is_special_node()) { if(&is_special_node() || !$SHAREDDIR) {
# #
# If the shared path used by Linktest for logging and temporary # If the shared path used by Linktest for logging and temporary
# files already exists, clear its contents for this run. # files already exists, clear its contents for this run.
...@@ -423,8 +427,10 @@ if(&is_special_node()) { ...@@ -423,8 +427,10 @@ if(&is_special_node()) {
chown($swapperid, $swappergid, $linktest_path); chown($swapperid, $swappergid, $linktest_path);
} }
$barr_count = @hosts; if (&is_special_node()) {
$barr_count--; $barr_count = @hosts;
$barr_count--;
}
} }
# #
......
#!/usr/bin/perl -wT #!/usr/bin/perl -wT
# #
# EMULAB-COPYRIGHT # EMULAB-COPYRIGHT
# Copyright (c) 2000-2007 University of Utah and the Flux Group. # Copyright (c) 2000-2010 University of Utah and the Flux Group.
# All rights reserved. # All rights reserved.
# #
use English; use English;
...@@ -48,6 +48,10 @@ my $CONTROL = "@USERNODE@"; ...@@ -48,6 +48,10 @@ my $CONTROL = "@USERNODE@";
my $TBBASE = "@TBBASE@"; my $TBBASE = "@TBBASE@";
my $SSH = "$TB/bin/sshtb"; my $SSH = "$TB/bin/sshtb";
# un-taint path
$ENV{'PATH'} = '/bin:/usr/bin:/usr/local/bin';
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
# #
# Testbed Support libraries # Testbed Support libraries
# #
...@@ -57,10 +61,6 @@ use libtestbed; ...@@ -57,10 +61,6 @@ use libtestbed;
use User; use User;
use Experiment; use Experiment;
# un-taint path
$ENV{'PATH'} = '/bin:/usr/bin:/usr/local/bin';
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
# #
# Turn off line buffering on output # Turn off line buffering on output
# #
......
#!/usr/bin/perl -wT #!/usr/bin/perl -wT
# #
# EMULAB-COPYRIGHT # EMULAB-COPYRIGHT
# Copyright (c) 2000-2006 University of Utah and the Flux Group. # Copyright (c) 2000-2010 University of Utah and the Flux Group.
# All rights reserved. # All rights reserved.
# #
use strict; use strict;
...@@ -10,13 +10,15 @@ use English; ...@@ -10,13 +10,15 @@ use English;
use POSIX; use POSIX;
# #
# XXX config stuff that does not belong on the client-side # XXX config stuff that does not belong on the client-side.
# Since run_linktest is typically run on ops instead of a client, I'll live.
# #
my $TB = "@prefix@"; my $TB = "@prefix@";
my $CLIENT_BINDIR = "@CLIENT_BINDIR@"; my $CLIENT_BINDIR = "@CLIENT_BINDIR@";
my $EVENTSERVER = "@EVENTSERVER@"; my $EVENTSERVER = "@EVENTSERVER@";
my $PROJROOT = "@PROJROOT_DIR@"; my $PROJROOT = "@PROJROOT_DIR@";
my $NOSHAREDFS = "@NOSHAREDFS@";
my $NODELOGDIR = "@CLIENT_VARDIR@/logs";
# #
# Wrapper for running the linktest daemon. This script is currently # Wrapper for running the linktest daemon. This script is currently
# setup so it can run on either ops or from an experimental node. # setup so it can run on either ops or from an experimental node.
...@@ -24,15 +26,17 @@ my $PROJROOT = "@PROJROOT_DIR@"; ...@@ -24,15 +26,17 @@ my $PROJROOT = "@PROJROOT_DIR@";
sub usage() sub usage()
{ {
print "Usage: run_linktest.pl ". print "Usage: run_linktest.pl ".
"[-q] [-r] [-d level] [-t timeout] [-v] [-s server] [-p port] [-k keyfile] [-l level] [-o logfile] -e pid/eid\n". "[-q] [-r] [-d level] [-t timeout] [-v] [-s server] [-p port] [-k keyfile] [-l level] [-o logfile] [-N] -e pid/eid\n".
"Use -q for quick termination mode, which skips the Bandwidth test\n". "Use -q for quick termination mode, which skips the Bandwidth test\n".
"Use -r to report results, but not errors\n" . "Use -r to report results, but not errors\n" .
"Use -v for verbose feedback messages\n" . "Use -v for verbose feedback messages\n" .
"Use -t <time> to set a timeout in seconds\n"; "Use -t <time> to set a timeout in seconds\n" .
"Use -N to use a per-node directory for data collection\n" .
" (default is to use a shared NFS directory).\n";
exit(1);