Commit c53d5827 authored by Mike Hibler's avatar Mike Hibler

Changes related to allowing seperate 'fs' (file server) node.

Entailed new instructions for manual setup as well as integration into
elabinelab framework.  First, the manual path:

setup.txt, setup-boss.txt, setup-ops.txt and new setup-fs.txt:
    Updated to reflect potential for separate fs node.  The org here
    is a little dicey and could be confusing with ops+fs vs. ops and fs.
    Has not been field tested yet.

*/GNUmakefile.in: new fs-install target.

configure, configure.in, defs-*:
    Somewhat unrelated, make min uid/gid to use be a defs setting.
    Also add config of fs-install.in script.

boss-install.in, ops-install.in and new fs-install.in:
    Handle distinct fs node.  If you have one, fs-install is run before
    ops-install.  All scripts rely on the defs file settings of FSNODE
    and USERNODE to determine if the fs node is seperate.

utils/checkquota.in:
    Just return "ok" if quotas are not used (i.e., if defs file FS_WITH_QUOTA
    string is null.

install/ports/emulab-fs:
    Meta port for fs node specific stuff.  Also a patch for the samba port
    Makefile so it doesn't drag in CUPs, etc.  Note that the current samba
    port Makefile has this change, I am just backporting to our version.

Elabinelab specific changes:

elabinelab-withfs.ns:
    NS fragment used in conjunction with
	tb-elab-in-elab-topology "withfs"
    to setup inner-elab with fs node.

elabinelab.ns:
    The hard work on the boss side.  Recognize seperate-fs config and handle
    running of rc.mkelab on that node.  fs setup happens before ops setup.

rc.mkelab:
    The hard work on the client side.  Recognize FsNode setup as well as
    differentiate ops+fs from ops setup.

Related stuff either not part of the repo or checked in previously:
    emulab-fs package
parent 317c82a5
......@@ -31,7 +31,8 @@ SUBDIRS = lib db assign www @optional_subdirs@ ipod security sensors \
all: all-subdirs
install:
@echo "Choose either boss-install (paper) or ops-install (plastic)"
@echo "Choose either boss-install, ops-install or fs-install"
@echo "Choose opsfs-install instead of ops-install for a combined ops/fs machine"
@echo "Choose tipserv-install for dedicated tip server machines."
#
......@@ -89,6 +90,13 @@ endif
@$(MAKE) -C tmcd control-install
@$(MAKE) -C account control-install
fs-install:
@$(MAKE) -C tbsetup fs-install
@$(MAKE) -C account fs-install
opsfs-install: ops-install fs-install
@echo "Combined ops/fs install done."
install-mkdirs:
-mkdir -p $(INSTALL_TOPDIR)/opsdir
-mkdir -p $(INSTALL_TOPDIR)/locks
......
......@@ -14,7 +14,7 @@ include $(OBJDIR)/Makeconf
SBIN_STUFF = tbacct addsfskey addpubkey mkusercert
LIBEXEC_STUFF = webtbacct webaddsfskey webaddpubkey webmkusercert
FS_SBIN_STUFF = quotamail
FSBIN_STUFF = quotamail
#
# Force dependencies on the scripts so that they will be rerun through
......@@ -42,10 +42,9 @@ post-install:
chown root $(INSTALL_SBINDIR)/mkusercert
chmod u+s $(INSTALL_SBINDIR)/mkusercert
# XXX ops == fs right now
control-install: fs-install
control-install:
fs-script-install: $(addprefix $(INSTALL_SBINDIR)/, $(FS_SBIN_STUFF))
fs-script-install: $(addprefix $(INSTALL_SBINDIR)/, $(FSBIN_STUFF))
fs-install: fs-script-install
......
......@@ -1365,6 +1365,8 @@ done
......@@ -1425,6 +1427,8 @@ BOSSEVENTPORT=2927
UNIFIED_BOSS_AND_OPS=0
FRISEBEEMCASTADDR="234.5.6"
FRISEBEEMCASTPORT=3564
MIN_UNIX_UID=10000
MIN_UNIX_GID=6000
#
# Okay, I know this is improper usage of --with. Too bad.
......@@ -1925,17 +1929,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:1929: checking for $ac_hdr" >&5
echo "configure:1933: 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 1934 "configure"
#line 1938 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1943: \"$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*
......@@ -1974,17 +1978,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:1978: checking for $ac_hdr" >&5
echo "configure:1982: 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 1983 "configure"
#line 1987 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1992: \"$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*
......@@ -2017,7 +2021,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:2021: checking for $ac_word" >&5
echo "configure:2025: 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
......@@ -2096,7 +2100,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:2100: checking for a BSD compatible install" >&5
echo "configure:2104: 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
......@@ -2157,7 +2161,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:2161: checking for $ac_word" >&5
echo "configure:2165: 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
......@@ -2328,7 +2332,8 @@ outfiles="$outfiles Makeconf GNUmakefile \
cdrom/GNUmakefile cdrom/tbbootconfig/GNUmakefile \
cdrom/groklilo/GNUmakefile \
dhcpd/dhcpd.conf.template dhcpd/GNUmakefile \
install/GNUmakefile install/ops-install install/boss-install \
install/GNUmakefile \
install/ops-install install/boss-install install/fs-install \
install/newnode_sshkeys/GNUmakefile install/smb.conf.head \
mote/GNUmakefile mote/tbuisp mote/tbsgmotepower mote/newmote \
mote/sgtools/GNUmakefile \
......@@ -2605,6 +2610,8 @@ s%@FRISEBEEMCASTADDR@%$FRISEBEEMCASTADDR%g
s%@FRISEBEEMCASTPORT@%$FRISEBEEMCASTPORT%g
s%@WINSUPPORT@%$WINSUPPORT%g
s%@CVSSUPPORT@%$CVSSUPPORT%g
s%@MIN_UNIX_UID@%$MIN_UNIX_UID%g
s%@MIN_UNIX_GID@%$MIN_UNIX_GID%g
s%@TBOPSEMAIL@%$TBOPSEMAIL%g
s%@TBOPSEMAIL_NOSLASH@%$TBOPSEMAIL_NOSLASH%g
s%@TBLOGSEMAIL@%$TBLOGSEMAIL%g
......
......@@ -148,6 +148,8 @@ AC_SUBST(FRISEBEEMCASTADDR)
AC_SUBST(FRISEBEEMCASTPORT)
AC_SUBST(WINSUPPORT)
AC_SUBST(CVSSUPPORT)
AC_SUBST(MIN_UNIX_UID)
AC_SUBST(MIN_UNIX_GID)
#
# Offer both versions of the email addresses that have the @ escaped
......@@ -206,6 +208,8 @@ BOSSEVENTPORT=2927
UNIFIED_BOSS_AND_OPS=0
FRISEBEEMCASTADDR="234.5.6"
FRISEBEEMCASTPORT=3564
MIN_UNIX_UID=10000
MIN_UNIX_GID=6000
#
# Okay, I know this is improper usage of --with. Too bad.
......@@ -766,7 +770,8 @@ outfiles="$outfiles Makeconf GNUmakefile \
cdrom/GNUmakefile cdrom/tbbootconfig/GNUmakefile \
cdrom/groklilo/GNUmakefile \
dhcpd/dhcpd.conf.template dhcpd/GNUmakefile \
install/GNUmakefile install/ops-install install/boss-install \
install/GNUmakefile \
install/ops-install install/boss-install install/fs-install \
install/newnode_sshkeys/GNUmakefile install/smb.conf.head \
mote/GNUmakefile mote/tbuisp mote/tbsgmotepower mote/newmote \
mote/sgtools/GNUmakefile \
......
......@@ -40,6 +40,8 @@ MAILMANSUPPORT=1
WINSUPPORT=1
SFSSUPPORT=0
CVSSUPPORT=1
MIN_UNIX_UID=10000
MIN_UNIX_GID=6000
#
# SSL Certificate stuff. Used to customize config files in ssl directory.
# Note that OrganizationalUnit is set in the cnf file.
......
......@@ -31,11 +31,15 @@ WWWHOST=changeme
TBMAINSITE=0
THISHOMEBASE=changeme
PLABSUPPORT=0
WIKISUPPORT=0
BUGDBSUPPORT=0
MAILMANSUPPORT=0
WINSUPPORT=0
SFSSUPPORT=0
CVSSUPPORT=0
DISABLE_NSE=1
# This means it is an inner elab!
ELABINELAB=1
WINSUPPORT=0
# The name of the outer boss for inner boss to request services from.
OUTERBOSS_NODENAME=changeme
#
......@@ -54,6 +58,7 @@ TESTBED_NETWORK=changeme
TESTBED_NETMASK=changeme
BOSSNODE_IP=changeme
USERNODE_IP=changeme
FSNODE_IP=changeme
CONTROL_ROUTER_IP=changeme
CONTROL_NETWORK=changeme
CONTROL_NETMASK=changeme
......@@ -69,3 +74,6 @@ NAMED_FORWARDERS=changeme
# Must localize to avoid conflict with outer emulab frisbeed.
#
FRISEBEEMCASTADDR=changeme
# testing
MIN_UNIX_UID=500
MIN_UNIX_GID=500
......@@ -25,6 +25,17 @@ USERNODE=ops.example.emulab.net
# as the ops node)
FSNODE=fs.example.emulab.net
#
# Minimum Unix uid and gid values for Emulab users.
# Emulab will create the initial user with these values and all additional
# users will have values greater than these. It would be unwise to make
# these less than 1000 to avoid conflicts with "standard" BSD and Linux
# users. These can also be tweaked to avoid pre-existing accounts on the
# fileserver machine.
#
MIN_UNIX_UID=10000
MIN_UNIX_GID=6000
#
# Addresses to which email will be sent - These are expected to go to mailing
# lists. You can either host the lists on your ops node, send them off to
......@@ -75,6 +86,14 @@ FSDIR_GROUPS=/groups
FSDIR_PROJ=/q/proj
FSDIR_USERS=/users
FSDIR_SHARE=/share
#
# Filesystems on which quotas should be enforced.
# Note that if multiple of the FSDIR_* vars above are on the same filesystem
# (e.g., /q/proj and /q/users) then you should only specify the base of the
# common filesystem on which they all reside here (e.g., /q).
# Set to the empty string to turn off quota checking.
#
FS_WITH_QUOTAS="/q /groups /users"
#
......
This diff is collapsed.
......@@ -9,7 +9,7 @@
##### Most recently tested on FreeBSD 4.11.
#####
##### Step 0 - OS installation and setup
##### Step 1 - OS installation and setup
Install FreeBSD on the machine you'll be using for your ops node, using the
standard FreeBSD installation process. When asked by the installer, it's best
......@@ -30,6 +30,19 @@ space to hold them:
be safe and build with at least a million).
/usr/testbed/ - Needs space for testbed software and logs. Several (3-4) GB
should be enough.
Do *not* create any user accounts yet, and just log in as root for the time being.
Our software will create user accounts later, once you get boss set up. If you
already created any users, then delete them with the "pw" command and make sure
the home directories for them are removed as well.
##### Step 1a - Shared filesystem setup for combined ops/fs machine.
If you have a separate 'fs' node, you should have already setup your shared
filesystems and can skip to Step 2. If this node is also to be your file
server, you will also need:
/users/ - Needs space for user home directories. Amount of space required
depends on how many users you expect to have.
Generally, though, we suggest that users store large
......@@ -46,8 +59,10 @@ space to hold them:
on what you want to make available.
You may want to enforce quotas on the user-writable filesystems. This is the
main reason you'd want to keep them in separate filesystems (i.e., so people can
have different /users/ and /proj/ quotas.)
main reason you'd want to keep them in separate filesystems (i.e., so people
can have different /users/ and /proj/ quotas.) If you do not think you will
ever use quotas, then you could make /users and /proj part of the same
filesystem.
Note also since /share is exported read-only, FreeBSD requires that it be on
a separate filesystem from anything that is exported read-write. So while
......@@ -61,12 +76,10 @@ symlinks to the appropriate places. ie., if you make one big filesystem called
ln -s /z/proj /proj
... etc.
Do *not* create any user accounts yet, and just log in as root for the time being.
Our software will create user accounts later, once you get boss set up. If you
already created any users, then delete them with the "pw" command and make sure
the home directories for them are removed as well.
In other words, we assume the existence of /users, /proj, /group and /share.
##### Step 1 - Installing packages
##### Step 2 - Installing packages
To make sure that you're running with versions of software from the ports
collection that are known to work with our software, and to save you hours
......@@ -105,10 +118,10 @@ ops feel like 'home' (like emacs, jove, or whatever). NOTE: You must
download and copy the ports tree into place, even if you do not intend to
install any packages yourself.
##### Step 2 - Unpacking and running configure
##### Step 3 - Unpacking and running configure
At this point, you'll need to make a 'defs' file - You will use the same
defs file on boss and ops. See defs-example in the top level directory
defs file on boss, ops and fs. See defs-example in the top level directory
as a starting point. You want to make sure each of the variables has a
definition that makes sense in your environment. Feel free to ask Utah if
something is not clear.
......@@ -128,7 +141,7 @@ unpack the source code is /usr/testbed/src/testbed. You will use the
Typically, you would store your defs file in the source tree along with
the other defs files that came in the tarball.
##### Step 3 - Running the ops installation script
##### Step 4 - Running the ops installation script
In the object tree you've configured (say, /usr/testbed/obj/testbed), there's
an 'install' subdirectory, with a script called 'ops-install'. Just run this
......@@ -153,7 +166,7 @@ sets up password-less 'sudo' for anyone in the 'wheel' group. If you don't want
these for security reasons, you can undo them after the installation script is
finished.
##### Step 4 - Installing from source
##### Step 5 - Installing from source
To install the actual testbed software, simply do a 'gmake ops-install' in your
object directory.
......@@ -167,17 +180,17 @@ addition, you'll need to build a custom kernel with the appropriate driver (you
may even need to get patches from Utah for some boards). You'll also need to
set up a few things (not yet automated), described in doc/adding_nodes.txt .
##### Step 5 - Setting up mailing lists
##### Step 6 - Setting up mailing lists
Optional. The ops-install script set up some mailing lists for the email
addresses you set up in the defs file, in /etc/mail/lists . If you want to run
these mailing lists off your ops node, you can put some people in them now.
These are just standard sendmail list files: a list of addresses and/or
archive files, one per line. If you chose to use archive files, give a path
to the file you'd like sendmail to stick all correspondance in, and create
to the file you'd like sendmail to stick all correspondence in, and create
this file.
##### Step 6 - Other miscellaneous things to set up
##### Step 7 - Other miscellaneous things to set up
[Nothing at this time]
......
This diff is collapsed.
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2004 University of Utah and the Flux Group.
# Copyright (c) 2000-2005 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -15,7 +15,7 @@ include $(OBJDIR)/Makeconf
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
#
all: boss-install ops-install
all: boss-install ops-install fs-install
include $(TESTBED_SRCDIR)/GNUmakerules
......
......@@ -36,6 +36,7 @@ my $FSNODE = '@FSNODE@';
my $BOSSNODE = '@BOSSNODE@';
my $BOSSNODE_IP= '@BOSSNODE_IP@';
my $USERNODE_IP= '@USERNODE_IP@';
my $FSNODE_IP= '@FSNODE_IP@';
#
# Some programs we use
......@@ -179,8 +180,9 @@ my %EXPERIMENTS =
# List of names that goes into $HOSTS and which must resolve.
#
my @OPS_NAMES = ($USERNODE, "users", "ops");
push(@OPS_NAMES, $FSNODE)
if ($USERNODE ne $FSNODE);
if ($USERNODE eq $FSNODE) {
push(@OPS_NAMES, "fs");
}
#
# The meta-port (name and version) that drags in all the dependancies for
......@@ -654,18 +656,25 @@ Phase "suidperl", "Setting the suid bit on $SUIDPERL", sub {
ExecQuietFatal("$CHMOD u+s $SUIDPERL");
};
Phase "hosts", "Adding boss/ops IP addresses to $HOSTS", sub {
Phase "hosts", "Adding boss/ops/fs IP addresses to $HOSTS", sub {
DoneIfEdited($HOSTS);
AppendToFileFatal($HOSTS,
"${BOSSNODE_IP}\t${BOSSNODE} boss",
"${USERNODE_IP}\t@OPS_NAMES");
my $hstr = "${BOSSNODE_IP}\t${BOSSNODE} boss".
"\n${USERNODE_IP}\t@OPS_NAMES";
if ($USERNODE ne $FSNODE) {
$hstr .= "\n${FSNODE_IP}\t${FSNODE} fs";
}
AppendToFileFatal($HOSTS, $hstr);
};
Phase "resolve", "Checking to make sure names for ops resolve", sub {
foreach my $name (@OPS_NAMES, ${BOSSNODE}, "boss") {
Phase "resolve", "Checking to make sure names for boss/ops/fs resolve", sub {
my @hnames = (@OPS_NAMES, ${BOSSNODE}, "boss");
if ($USERNODE ne $FSNODE) {
push @hnames, ${FSNODE}, "fs";
}
foreach my $name (@hnames) {
Phase $name, $name, sub {
if (gethostbyname($name)) {
PhaseSkip("$name resolves");
PhaseSucceed("$name resolves");
} else {
PhaseFail("$name does not resolve - please see setup.txt\n" .
"for further instructions!");
......@@ -776,7 +785,7 @@ Phase "ssh", "Setting up root ssh from boss to ops", sub {
" StrictHostKeyChecking no",
" Protocol 1,2");
};
Phase "keycopy", "Copy root ssh keys to ops", sub {
Phase "keycopy", "Copy root ssh keys to ops and fs", sub {
if (! ExecQuiet("$SSH -o 'BatchMode=yes' root\@${USERNODE} pwd")) {
PhaseSkip("Key already copied");
} else {
......@@ -788,13 +797,35 @@ Phase "ssh", "Setting up root ssh from boss to ops", sub {
" '(cat > ${ETCSSH}/ssh_known_hosts)'");
if (ExecQuiet("$SSH -o 'BatchMode=yes' root\@${USERNODE} pwd")) {
PhaseFail("You'll need to manually copy boss's public SSH key\n".
"over to ops print so boss can get into ops without\n".
"a password. Run the following print as root:\n" .
PhaseFail("You need to manually copy boss's public SSH key\n".
"over to $USERNODE so boss can get into it without\n".
"a password. Run the following as root:\n" .
"scp $ROOT_PUBKEY ${USERNODE}:$ROOT_AUTHKEY");
}
}
};
Phase "keycopy2", "Copy root ssh keys to fs", sub {
if ($USERNODE eq $FSNODE) {
PhaseSkip("FS node is ops node");
}
if (! ExecQuiet("$SSH -o 'BatchMode=yes' root\@${FSNODE} pwd")) {
PhaseSkip("Key already copied");
} else {
ExecQuietFatal("$SCP -i $INIT_PRIVKEY ".
"$ROOT_PUBKEY ${FSNODE}:$ROOT_AUTHKEY");
# Copy hosts keys to fs.
ExecQuietFatal("cat ${ETCSSH}/*.pub | $SSH ${FSNODE} ".
" '(cat > ${ETCSSH}/ssh_known_hosts)'");
if (ExecQuiet("$SSH -o 'BatchMode=yes' root\@${FSNODE} pwd")) {
PhaseFail("You need to manually copy boss's public SSH key\n".
"over to $FSNODE so boss can get into it without\n".
"a password. Run the following as root:\n" .
"scp $ROOT_PUBKEY ${FSNODE}:$ROOT_AUTHKEY");
}
}
};
};
Phase "rndc", "Setting up rndc for control of nameserver", sub {
......@@ -934,6 +965,13 @@ Phase "named", "Setting up initial named configuration", sub {
ExecQuietFatal("$SCP $TOP_OBJDIR/named/resolv.conf.ops ".
" ${USERNODE}:/etc/resolv.conf");
};
Phase "copying2", "Copying resolv.conf over to fs", sub {
if ($USERNODE eq $FSNODE) {
PhaseSkip("FS node is ops node");
}
ExecQuietFatal("$SCP $TOP_OBJDIR/named/resolv.conf.ops ".
" ${FSNODE}:/etc/resolv.conf");
};
};
Phase "firstuser", "Setting up initial user (elabman)", sub {
......
This diff is collapsed.
This diff is collapsed.
# New ports collection makefile for: emulab-ops
# Date created: 28 January 2003
# Whom: ricci@cs.utah.edu
PORTNAME= emulab-fs
PORTVERSION= 1.4
CATEGORIES= misc
MASTER_SITES= #none
DISTFILES= #none
EXTRACT_ONLY= #none
COMMENT= "Meta-port for an emulab fs node"
MAINTAINER= hibler@cs.utah.edu
#
# For samba, so that it doesn't suck in everything under the sun
#
.MAKEFLAGS+= -DSAMBA_SUBPORT -DWITHOUT_WINBIND -DWITHOUT_LDAP -DWITHOUT_POPT
#
# This prevents any ports from trying to run interactively - some, ask silly
# questions without this option.
#
.MAKEFLAGS+= -DBATCH
RUN_DEPENDS= gmake:${PORTSDIR}/devel/gmake \
sudo:${PORTSDIR}/security/sudo \
rsync:${PORTSDIR}/net/rsync \
smbd:${PORTSDIR}/net/samba3
NO_BUILD= yes
do-install: # empty
.include <bsd.port.mk>
Meta-port for an emulab fs node. This port does not install the emulab software
itself - it just ensures that the requisite ports are installed.
@comment This packing list left intentionally empty
......@@ -7,7 +7,7 @@
PORTSDIR=/usr/ports
PORTSUBDIR=misc
SRCDIR=`dirname $0`
PORTS="elvind emulab-boss emulab-ops libelvin emulab-tftp-hpa p5-GD-old ulsshxmlrpcpp"
PORTS="elvind emulab-boss emulab-fs emulab-ops libelvin emulab-tftp-hpa p5-GD-old ulsshxmlrpcpp"
for PORT in $PORTS
do
......
--- /usr/ports/net/samba3/Makefile.orig Tue Aug 23 23:31:08 2005
+++ /usr/ports/net/samba3/Makefile Tue Aug 23 23:17:58 2005
@@ -63,8 +63,8 @@
.if !defined(SAMBA_SUBPORT)
OPTIONS= LDAP "With LDAP support" on \
- ADS "With Active Directory support" on \
- CUPS "With CUPS printing support" on \
+ ADS "With Active Directory support" off \
+ CUPS "With CUPS printing support" off \
WINBIND "With WinBIND support" on \
ACL_SUPPORT "With ACL support" off \
SYSLOG "With Syslog support" off \
......@@ -55,5 +55,5 @@ mingid 1
# core developers, comment out the above lines and uncomment the ones
# below.
#
# minuid 10000
# mingid 6000
# minuid @MIN_UNIX_UID@
# mingid @MIN_UNIX_GID@
......@@ -30,9 +30,11 @@ SBIN_STUFF = resetvlans console_setup.proxy sched_reload named_setup \
newnode_reboot savelogs.proxy eventsys.proxy \
elabinelab snmpit.proxy panic repos_daemon
CTRLBIN_STUFF = console_setup.proxy exports_setup.proxy sfskey_update.proxy \
CTRLBIN_STUFF = console_setup.proxy sfskey_update.proxy \
savelogs.proxy eventsys.proxy
FSBIN_STUFF = exports_setup.proxy
LIBEXEC_STUFF = rmproj wanlinksolve wanlinkinfo \
os_setup mkexpdir console_setup webnscheck webreport \
webendexp webbatchexp webpanic \
......@@ -180,6 +182,12 @@ control-install: $(addprefix $(INSTALL_SBINDIR)/, $(CTRLBIN_STUFF)) \
@$(MAKE) -C ns2ir control-install
@$(MAKE) -C nseparse control-install
#
# FS install
#
fs-install: $(addprefix $(INSTALL_SBINDIR)/, $(FSBIN_STUFF)) \
$(addprefix $(INSTALL_LIBDIR)/, libtestbed.pm)
#
# Tip servers get very little
#
......
......@@ -288,10 +288,33 @@ my $mkelab = "$TB/etc/rc.mkelab";
if (-e "/proj/$pid/exp/$eid/rc.mkelab") {
$mkelab = "/proj/$pid/exp/$eid/rc.mkelab";
}
print "Copying $mkelab to ${bossnode}/${opsnode}\n";
print "Copying $mkelab to ${bossnode}/${opsnode}";
print "/${fsnode}"
if (defined($fsnode));
print "\n";
system("scp $mkelab ${bossnode}:/tmp");
system("scp $mkelab ${opsnode}:/tmp");
system("scp $mkelab ${fsnode}:/tmp")
if (defined($fsnode));
if (defined($fsnode)) {
TBDebugTimeStamp("Setting up fsnode");
print "Setting up fsnode on $fsnode\n";
system("$SSH -host $fsnode /tmp/rc.mkelab -s -d > /tmp/fsnode.$$ 2>&1");
if ($?) {
$UID = $SAVEUID;
SENDMAIL("$user_name <$user_email>",
"ElabInElab Failure: $pid/$eid",
"Error building the fs node ($fsnode)",
$TBOPS,
"Cc: $TBOPS",
("/tmp/fsnode.$$"));
system("rm -f /tmp/fsnode.$$ /tmp/opsnode.$$ /tmp/bossnode.$$");
print STDERR "*** $0:\n".
" Error building the fsnode ($fsnode)!\n";
exit(($debug ? 0 : -1));
}
}
TBDebugTimeStamp("Setting up opsnode");
print "Setting up opsnode on $opsnode\n";
system("$SSH -host $opsnode /tmp/rc.mkelab -s -d > /tmp/opsnode.$$ 2>&1");
......@@ -303,7 +326,7 @@ if ($?) {
$TBOPS,
"Cc: $TBOPS",
("/tmp/opsnode.$$"));
system("rm -f /tmp/opsnode.$$ /tmp/bossnode.$$");
system("rm -f /tmp/fsnode.$$ /tmp/opsnode.$$ /tmp/bossnode.$$");
print STDERR "*** $0:\n".
" Error building the opsnode ($opsnode)!\n";
exit(($debug ? 0 : -1));
......@@ -319,20 +342,29 @@ if ($?) {
$TBOPS,
"Cc: $TBOPS",
("/tmp/bossnode.$$"));
system("rm -f /tmp/opsnode.$$ /tmp/bossnode.$$");
system("rm -f /tmp/fsnode.$$ /tmp/opsnode.$$ /tmp/bossnode.$$");
print STDERR "*** $0:\n".
" Error building the bossnode ($bossnode)!\n";
exit(($debug ? 0 : -1));
}
# Send these log files off now so that we can look at them.
SENDMAIL("$user_name <$user_email>",
"ElabInElab Setup Log: $pid/$eid",
"Logs for building ops/boss ($opsnode/$bossnode)",
$TBOPS,
"Cc: $TBOPS",
("/tmp/opsnode.$$", "/tmp/bossnode.$$"));
system("rm -f /tmp/opsnode.$$ /tmp/bossnode.$$");
if (defined($fsnode)) {
SENDMAIL("$user_name <$user_email>",
"ElabInElab Setup Log: $pid/$eid",
"Logs for building fs/ops/boss ($fsnode/$opsnode/$bossnode)",
$TBOPS,
"Cc: $TBOPS",
("/tmp/fsnode.$$", "/tmp/opsnode.$$", "/tmp/bossnode.$$"));
} else {
SENDMAIL("$user_name <$user_email>",
"ElabInElab Setup Log: $pid/$eid",
"Logs for building ops/boss ($opsnode/$bossnode)",
$TBOPS,
"Cc: $TBOPS",
("/tmp/opsnode.$$", "/tmp/bossnode.$$"));
}
system("rm -f /tmp/fsnode.$$ /tmp/opsnode.$$ /tmp/bossnode.$$");
$UID = $SAVEUID;
# Run as real user for the next few scripts, which are setuid.
......@@ -353,6 +385,16 @@ if ($?) {
" Failed to reconfig/restart DHCPD.\n");
}
if (defined($fsnode)) {
# Reboot fs and wait for it to come back.
print "Rebooting fsnode ($fsnode).\n";
TBDebugTimeStamp("Rebooting fsnode");
system("$nodereboot -w $fsnode");
if ($?) {
die("*** $0:\n".
" Error rebooting the fsnode ($fsnode)!\n");
}
}
# Reboot ops and wait for it to come back.
print "Rebooting opsnode ($opsnode).\n";
TBDebugTimeStamp("Rebooting opsnode");
......@@ -516,8 +558,8 @@ sub DumpDBGoo()
#
# These tables are dumped by role (node/ops). For each one dump the table
# as is, unless its the ops node. For that one we want to change its
# node_id to "ops" and its type to ops.
# as is, unless its the fs or ops node. For those we want to change the
# node_id to "fs" or "ops" and their type to ops.
#
my @NODETABLES = ("node_auxtypes", "node_status", "nodes",
"node_rusage", "node_hostkeys", "node_idlestats");
......@@ -563,24 +605,26 @@ sub DumpDBGoo()
" v.pid=r.pid and v.eid=r.eid ".
"where r.pid='$pid' and r.eid='$eid' and ".
" t.node_id is not null and ".
" (v.inner_elab_role='node' or ".
" v.inner_elab_role='ops')")
" v.inner_elab_role in ('node','fs','ops')")
or die("*** $0:\n".
" Could not create temporary table temp_$table\n");
#
# Rename the ops node in each table. For the nodes table, there is a
# bunch of other stuff to do.
# Rename the fs and ops node in each table. For the nodes table,
# there is a bunch of other stuff to do.
#
DBQueryFatal("update temp_${table} set node_id='fs' ".
"where node_id='$fsnode'")
if (defined($fsnode));
DBQueryFatal("update temp_${table} set node_id='ops' ".
"where node_id='$opsnode'");
if ($table eq "nodes") {
DBQueryFatal("update temp_${table} set ".
" type='ops', ".
" phys_nodeid='ops', ".
" phys_nodeid=node_id, ".
" role='ctrlnode', ".
" op_mode='OPSNODEBSD' ".
"where node_id='ops'");
"where node_id in ('fs','ops')");
# Also add the nodes that correspond to the "trunk" wires.
DBQueryFatal("insert into temp_${table} ".
......@@ -706,7 +750,7 @@ sub DumpDBGoo()
"left join virt_nodes as v on v.vname=r.vname and ".
" v.pid=r.pid and v.eid=r.eid ".
"where r.pid='$pid' and r.eid='$eid' and ".
" (v.inner_elab_role='node' or v.inner_elab_role='ops')")
" v.inner_elab_role in ('node','ops','fs')")
or die("*** $0:\n".
" Could not create temporary table temp_interfaces\n");
......@@ -724,7 +768,13 @@ sub DumpDBGoo()
or die("*** $0:\n".
" Could not update roles in temp_interfaces\n");
# And rename the ops node as above.
# And rename the fs/ops nodes as above.
if (defined($fsnode)) {
DBQueryWarn("update temp_interfaces set node_id='fs' ".
"where node_id='$fsnode'")
or die("*** $0:\n".
" Could not fs node_id in temp_interfaces\n");
}
DBQueryWarn("update temp_interfaces set node_id='ops' ".