Commit b4074bfc authored by cvs2svn's avatar cvs2svn

This commit was manufactured by cvs2svn to create tag 'frisbee-mp'.

Sprout from ptopgen-dev 2008-05-09 19:09:09 UTC cvs2svn <admin@example.com> 'This commit was manufactured by cvs2svn to create branch 'ptopgen-dev'.'
Cherrypick from master 2007-12-07 19:40:03 UTC Pramod R Sanaga <pramod@flux.utah.edu> 'First draft of the bw-bottleneck paper - includes the abstract.':
    tbsetup/template_swapin.in
    www/sec-check/README-howto.txt
    www/kb-manage.php3
    www/sec-check/results/uncaught-probes.list
    tbsetup/os_setup.in
    account/newproj.in
    utils/osstuff.sh
    www/tbauth.php3
    firewall/initfwvars.pl.in
    www/login.php3
    www/sec-check/results/site_inputs.list
    event/lib/event.h
    assign/parse_top.cc
    collab/trac/tracproxy.in
    delay/linux/kmods/linux-2.6.20-1.2944.fc6.emulab-1.linkdelay.patch
    www/sec-check/results/setup_probe.wget
    tmcd/common/config/rc.fakejail
    tmcd/linux/liblocsetup.pm
    assign/physical.h
    db/backup.in
    tbsetup/exports_setup.in
    tmcd/freebsd/mkextrafs.pl
    www/tutorial/docwrapper.php3
    www/editgroup.php3
    utah/Makefile
    tools/rmanage/GNUmakefile.in
    www/sec-check/urls-to-wget.gawk
    image-test/tests/single/info
    sensors/slothd/webfeedback.in
    defs-duerig-emulab
    www/sec-check/failure.txt
    tbsetup/labels/testbed.tcl
    image-test/tests/pair/nsfile.ns
    tmcd/linux/group
    www/sec-check/input_values.list
    doc/vnode-impl.txt
    collab/trac/tracxlogin.in
    tbsetup/plab/plabrenewd.in
    tbsetup/power.in
    www/doc/hw-recommend.html
    tbsetup/plab/plabrenewonce.in
    db/GNUmakefile.in
    www/sec-check/results/show_probe.wget
    www/software.html
    www/sec-check/results/admin_forms.list
    assign/featuredesire.h
    tmcd/linux/delaysetup
    tbsetup/node_reboot.in
    tmcd/linux/gshadow
    tbsetup/plab/etc/fixsudo.sh
    tbsetup/rmuser.in
    capture/GNUmakefile.in
    www/sec-check/results/input_names.list
    www/sec-check/results/public_inputs.list
    account/newuser.in
    tbsetup/snmpit.proxynew.in
    www/sec-check/results/site_files.list
    db/interswitch.in
    sql/database-migrate.txt
    db/OSinfo.pm.in
    tbsetup/ns2ir/nstb_compat.tcl
    tbsetup/plab/libplabnodehist.pm.in
    image-test/tests/traffic-gen/nsfile.ns
    pelab/bw-bottleneck/sharedBottle.pl
    tools/rmanage/rmanage.c
    tmcd/common/config/rc.trafgen
    tmcd/decls.h
    www/defs.php3.in
    www/hyperviewer/docwrapper.php3
    www/moduserinfo.php3
    www/resendapproval.php
    tbsetup/plab/libplabmon.pm.in
    utils/GNUmakefile.in
    tbsetup/mkproj.in
    backend/GNUmakefile.in
    www/plabmetrics.php3
    tbsetup/ns2ir/node.tcl
    pelab/bw-bottleneck/paper_draft.txt
    tmcd/common/bootvnodes
    tbsetup/snmpit.proxy.in
    db/audit.in
    tbsetup/plab/mod_PLC4.py.in
    pelab/bgmon/libwanetmon.pm
    www/approveuser.php3
    tbsetup/plab/GNUmakefile.in
    assign/score.cc
    assign/file_formats.txt
    tbsetup/snmpit_lib.pm
    tmcd/freebsd/slicefix
    tmcd/freebsd/cdboot/rc.cdboot
    www/sec-check/results/show_probe.urls
    www/sec-check/results/probe-labels.list
    tbsetup/switchmac.in
    image-test/tests/sync/nsfile.ns
    tbsetup/vnode_setup.in
    tmcd/plab/fixsudo.sh
    tbsetup/libtestbed.pm.in
    tbsetup/batchexp.in
    www/joinproject.php3
    assign/parse_ptop.cc
    tmcd/cygwinxp/liblocsetup.pm
    tbsetup/tbswap.in
    www/group_defs.php
    www/doc/docwrapper.php3
    doc/UPDATING
    pelab/bgmon/manager.pl
    tbsetup/plab/etc/netbed_files/GNUmakefile.in
    assign/top.xsd
    tmcd/common/config/rc.tunnels
    utils/loghole.in
    pelab/init-elabnodes.pl
    db/User.pm.in
    event/lib/event.c
    www/approveproject.php3
    www/fancy-banner-short.png
    tmcd/common/config/rc.accounts
    tmcd/common/config/rc.ifconfig
    tbsetup/libreboot.pm.in
    www/menu.php3
    utils/vlandiff.in
    tmcd/freebsd5/rc.dhclient
    image-test/ImageTest.pm
    www/node_defs.php
    www/index.php3
    www/sec-check/problem.txt
    pelab/bw-bottleneck/createClusters.pl
    image-test/tests/router/nsfile.ns
    backend/editnodetype.in
    config.h.in
    www/project_defs.php
    tbsetup/elabinelab.in
    tmcd/common/config/rc.localize
    account/tbacct.in
    www/gotommlist.php3
    capture/capdecls.h
    assign/top.rng
    db/changeuid.in
    pelab/bgmon/managerclient.pl
    tbsetup/plab/plabnodehistmetrics.in
    www/newosid.php3
    tmcd/freebsd/liblocsetup.pm
    db/Group.pm.in
    www/sec-check/teardown_forms.list
    capture/capture.c
    www/showsumstats.php3
    www/doc/windows.html
    www/sec-check/results/files_missing.list
    backend/editsitevars.in
    tbsetup/ptopgen.in
    www/sec-check/GNUmakefile.in
    tmcd/fedora/modprobe.conf
    image-test/tests/single/nsfile.ns
    doc/customize-mfs.txt
    image-test/README
    sql/database-fill.sql
    db/libdb.pm.in
    tbsetup/plab/etc/netbed_files/installcron.sh
    db/nfree.in
    cdrom/tbbootconfig/testbed_boot.h
    www/doc/exclasses.html
    www/newgroup.php3
    tbsetup/plab/mod_PLCNM.py.in
    pelab/bgmon/opsrecv.pl
    doc/setup.txt
    tmcd/common/config/rc.trace
    tmcd/linux/GNUmakefile.in
    tmcd/common/libtmcc.pm
    tbsetup/plab/plabmon_badpool.pm.in
    www/doc.php3
    www/gototrac.php3
    www/toggle.php
    www/sec-check/results/teardown_cases.urls
    www/otheremulabs.html
    www/sec-check/setup_forms.list
    www/newproject.php3
    db/Image.pm.in
    tbsetup/snmpit.in
    image-test/tests/traffic-gen/tests.pl
    LICENSE
    install/newnode_sshkeys/identity.newnode
    tmcd/tmcc.c
    www/sec-check/results/admin_files.list
    assign/ptop.dtd
    www/approveproject_form.php3
    image-test/image-test
    tbsetup/libtestbed.py.in
    install/newnode_sshkeys/identity.newnode.pub
    www/sec-check/results/setup_cases.urls
    backend/newgroup.in
    tbsetup/console_setup.in
    tmcd/common/config/rc.progagent
    pelab/bgmon/packbgmon
    tbsetup/snmpit_cisco.pm
    assign/top.rnc
    cdrom/tbbootconfig/tbbootconfig.c
    www/sec-check/results/setup_cases.wget
    tbsetup/snmpit_remote.pm.in
    doc/updating-RHL/FC4-build.sh
    backend/newimageid.in
    image-test/tests/single/parms
    firewall/NOTES
    tbsetup/ns2ir/tb_compat.tcl.in
    tbsetup/plab/etc/netbed_files/thttpd.restart
    event/program-agent/program-agent.c
    pelab/bgmon/automanagerclient.pl
    tbsetup/plab/libplab.py.in
    tmcd/freebsd/jail/rc.injail
    tmcd/common/config/rc.linkagent
    www/url_defs.php
    www/people.php3
    www/sec-check/results/teardown_probe.urls
    pelab/bgmon/bgmon.pl
    cdrom/groklilo/groklilo.c
    configure
    backend/newimageid_ez.in
    www/fancy-header.png
    sensors/slothd/sdcollectd.c
    tmcd/common/watchdog
    tmcd/common/vnodesetup
    collab/mailman/GNUmakefile.in
    www/sec-check/results/setup_probe.urls
    db/avail.in
    www/sec-check/results/admin_inputs.list
    tbsetup/plab/plabslice.in
    tbsetup/swapexp.in
    tmcd/common/libsetup.pm
    xmlrpc/libxmlrpc.pm.in
    tmcd/linux/shadow
    db/Experiment.pm.in
    tmcd/common/rc.bootsetup
    www/pubs.html
    db/nalloc.in
    www/showexp_list.php3
    tools/pcapper/pcapper.c
    assign/assign.cc
    tbsetup/plab/plabdiscover.in
    tmcd/linux/passwd
    xmlrpc/emulabserver.py.in
    tmcd/GNUmakefile.in
    doc/cisco-voodoo.txt
    tbsetup/plab/plabmonitord.in
    www/user_defs.php
    www/sec-check/results/teardown_probe.wget
    collab/mailman/mailmanproxy.in
    www/sec-check/results/analyze_activate.txt
    tbsetup/plab/plabmon_goodpool.pm.in
    tbsetup/rmproj.in
    tbsetup/named_setup.in
    www/sec-check/results/uncaught-files.list
    www/tutorial/wireless.html
    tmcd/common/rc.linktest
    tbsetup/assign_wrapper.in
    tbsetup/ns2ir/lanlink.tcl
    www/doc/expubs.html
    www/tutorial/tutorial.html
    www/sec-check/results/teardown_cases.wget
    www/sec-check/results/show_cases.urls
    sensors/slothd/digest-slothd
    db/Node.pm.in
    www/docwrapper.php3
    utils/wanodecheckin.in
    configure.in
    db/Project.pm.in
    www/sec-check/results/analyze_output.txt
    tbsetup/libadminmfs.pm.in
    www/deleteosid.php3
    doc/shellonboss.txt
    tmcd/freebsd6/netif-emulab.in
    event/delay-agent/callback.c
    www/sec-check/results/site_forms.list
    account/GNUmakefile.in
    www/sdr/docwrapper.php3
    image-test/tests/single/tests.pl
    assign/featuredesire.cc
    pelab/bw-bottleneck/wavelet/Clustering/udpClient/udpClient.cc
    www/sec-check/results/show_cases.wget
    tmcd/tmcd.c
    www/hardware.html
    tbsetup/plab/plabnode.in
    sql/database-create.sql
    tmcd/common/bootsubnodes
Delete:
    account/adduserhook.in
    assign/ptop.rnc
    assign/ptop.rng
    assign/ptop.xsd
    assign/vtop.rnc
    assign/vtop.rng
    assign/vtop.xsd
    backend/joinproject.in
    capture/caplog.c
    capture/caplog.in
    capture/caplogserver.c
    collab/mailman/addprojadminlist.in
    collab/mailman/closeprojadminlist.in
    collab/trac/emulab_auth.py
    db/Lan.pm.in
    db/changecreator.in
    db/checkstats.in
    db/emdbi.pm.in
    db/emutil.pm.in
    doc/setup-nortel.txt
    doc/setup-plc.txt
    doc/updating-RHL/Fedora8-build.txt
    doc/updating-RHL/Fedora8-etc-patches/blacklist.patch
    doc/updating-RHL/Fedora8-etc-patches/csh.login.patch
    doc/updating-RHL/Fedora8-etc-patches/inittab.patch
    doc/updating-RHL/Fedora8-etc-patches/modprobe.conf
    doc/updating-RHL/Fedora8-etc-patches/profile.patch
    doc/updating-RHL/Fedora8-etc-patches/rsyslog.conf.patch
    doc/updating-RHL/Fedora8-etc-patches/selinux-config.patch
    doc/updating-RHL/Fedora8-etc-patches/sshd_config.patch
    doc/updating-RHL/Fedora8-etc-patches/sudoers.patch
    doc/updating-RHL/Fedora8-etc-patches/sysconfig-i18n.patch
    doc/updating-RHL/Fedora8-install.txt
    doc/updating-RHL/Fedora8-rpm-list-install.txt
    doc/updating-RHL/Fedora8-rpm-list.txt
    event/delay-agent/new/DummynetPipe.cc
    event/delay-agent/new/DummynetPipe.hh
    event/delay-agent/new/EventPipe.cc
    event/delay-agent/new/EventPipe.hh
    event/delay-agent/new/Makefile
    event/delay-agent/new/NetlinkPipe.cc
    event/delay-agent/new/NetlinkPipe.hh
    event/delay-agent/new/Parameter.cc
    event/delay-agent/new/Parameter.hh
    event/delay-agent/new/Pipe.cc
    event/delay-agent/new/Pipe.hh
    event/delay-agent/new/PipeInfo.hh
    event/delay-agent/new/RootPipe.cc
    event/delay-agent/new/RootPipe.hh
    event/delay-agent/new/lib.cc
    event/delay-agent/new/lib.hh
    event/delay-agent/new/linkCallback.cc
    event/delay-agent/new/main.cc
    event/delay-agent/new/presentation.tex
    event/delay-agent/new/resetCallback.cc
    event/delay-agent/new/run-delay.sh
    event/delay-agent/new/run-test.pl
    ipod/patch-ipod-linux-2.6.23
    pelab/bgmon/flexlab-canonicalization-misc-notes.txt
    pelab/bgmon/fpingwrapper.pl
    pelab/bgmon/iperfwrapper.pl
    pelab/bw-bottleneck/backfill_dummynet/delayagent_callback.c
    pelab/bw-bottleneck/backfill_dummynet/ip_dummynet.c
    pelab/bw-bottleneck/backfill_dummynet/ip_dummynet.h
    pelab/bw-bottleneck/clean-pipes.sh
    pelab/bw-bottleneck/multiplex-client.sh
    pelab/bw-bottleneck/multiplex-monitor.py
    pelab/bw-bottleneck/multiplex-server.sh
    pelab/bw-bottleneck/node-anomaly.pl
    pelab/bw-bottleneck/plab-all-multiplex.pl
    pelab/bw-bottleneck/plot-all.pl
    pelab/bw-bottleneck/run-monitor.sh
    pelab/bw-bottleneck/scan-multiplex.pl
    pelab/bw-bottleneck/send-bottle.pl
    pelab/bw-bottleneck/send-multiplex.pl
    protogeni/GNUmakefile.in
    protogeni/etc/protogeni.sql
    protogeni/lib/GNUmakefile.in
    protogeni/lib/GeniCM.pm.in
    protogeni/lib/GeniCMClient.pm.in
    protogeni/lib/GeniDB.pm.in
    protogeni/lib/GeniSA.pm.in
    protogeni/lib/GeniSAClient.pm.in
    protogeni/lib/GeniSlice.pm.in
    protogeni/lib/GeniSliver.pm.in
    protogeni/lib/GeniTicket.pm.in
    protogeni/lib/GeniUser.pm.in
    protogeni/lib/Protogeni.pm.in
    protogeni/lib/test.pl.in
    protogeni/protogeni.sql
    protogeni/security/GNUmakefile.in
    protogeni/security/credential.rnc
    protogeni/security/credential.xsd
    protogeni/security/sig.xsd
    protogeni/security/signgenicred.in
    protogeni/security/test1.xml
    protogeni/security/test2.xml
    protogeni/security/verifygenicred.in
    protogeni/security/xml.xsd
    protogeni/xmlrpc/GNUmakefile.in
    protogeni/xmlrpc/GeniResponse.pm
    protogeni/xmlrpc/Genixmlrpc.pm.in
    protogeni/xmlrpc/protogeni-client.pl.in
    protogeni/xmlrpc/protogeni-client.py.in
    protogeni/xmlrpc/protogeni-cm.pl.in
    protogeni/xmlrpc/protogeni.py.in
    sql/close-projadminlists.pl
    sql/create-projadminlists.pl
    sql/newlans.pl
    tbsetup/plab/plabfed.in
    tmcd/linux/chpid.c
    tmcd/linux/mkvserver.pl
    tmcd/linux/netfpgactl
    tmcd/linux/vserver/rc.invserver
    tmcd/linux/vserver/vserver-cnet.sh
    tmcd/linux/vserver/vserver-init.sh
    tmcd/linux/vserver/vserver-rc.sh
    utah/bibliography/html-gen.py
    utah/doc/dp-install-fast.txt
    utah/doc/dp-install.txt
    utah/doc/experiment-states.txt
    utils/anonsendmail.in
    www/fancy-header-CMULAB.svg
    www/fancy-header-cmuemulab.png
    www/fancy-header-emulab.net.png
    www/fancy-sheader-CMULAB.svg
    www/fancy-sheader-cmuemulab.png
    www/fancy-sheader-emulab.net.png
    www/hardware-emulab.net.html
    www/hardware.php
    www/tutorial/netfpga.html
parent 4c5738e0
......@@ -9,7 +9,7 @@ granted provided that the following conditions are met.
By accepting this software, you agree:
-not to redistribute it, even within your organization;
-that within two months of the official Utah Emulab release you will upgrade
-that within a month of the official Utah Emulab release you will upgrade
to that release and its license[*] and destroy all reasonably accessible
copies of this software snapshot; after that month all rights you have to
use, copy, or modify this software snapshot will terminate;
......@@ -34,7 +34,7 @@ THE UNIVERSITY OF UTAH ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
CONDITION. THE UNIVERSITY OF UTAH DISCLAIMS ANY LIABILITY OF ANY KIND
FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
April 28, 2008
June 12, 2007
Flux Research Group
School of Computing
......@@ -43,11 +43,14 @@ April 28, 2008
Salt Lake City, UT 84112
[*] Utah plans to release the Emulab software under this open source
license: the GNU Affero General Public License version 3 (AGPLv3),
found at http://www.fsf.org/licensing/licenses/agpl-3.0.html .
[*] Within a month after the GNU Affero General Public License
version 3 (AGPLv3) is finalized, Utah expects to release the
Emulab software under that open source license.
The AGPLv3 consists of the GNU General Public License version 3 (GPLv3)
with a single short added Section 13, which requires that the source
be freely available to users who interact with the software through a
network.
A draft of AGPLv3 is available at http://gplv3.fsf.org/agplv3-dd1.txt.
It consists of the GNU General Public License version 3 (GPLv3) with a
single short added Section 13, which requires that the source be
freely available to users who interact with the software through a
network. GPLv3's last call draft is available at
http://gplv3.fsf.org/gpl-draft-2007-05-31.txt and is planned be
finalized by June 29, 2007.
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2008 University of Utah and the Flux Group.
# Copyright (c) 2000-2007 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -16,7 +16,6 @@ SBIN_STUFF = tbacct addsfskey addpubkey mkusercert quotamail genpubkeys \
newuser newproj
LIBEXEC_STUFF = webtbacct webaddsfskey webaddpubkey webmkusercert \
webnewuser webnewproj
CTRLSBIN_STUFF = adduserhook
# These scripts installed setuid, with sudo.
SETUID_BIN_SCRIPTS =
......@@ -27,7 +26,7 @@ SETUID_LIBX_SCRIPTS =
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
#
all: $(SBIN_STUFF) $(LIBEXEC_STUFF) $(CTRLSBIN_STUFF)
all: $(SBIN_STUFF) $(LIBEXEC_STUFF)
include $(TESTBED_SRCDIR)/GNUmakerules
......@@ -51,8 +50,6 @@ post-install:
control-install:
hook-install: $(addprefix $(INSTALL_DIR)/opsdir/sbin/, $(CTRLSBIN_STUFF))
# This rule says what web* script depends on which installed binary directory.
$(LIBEXEC_STUFF): $(INSTALL_SBINDIR)
......@@ -67,7 +64,3 @@ $(LIBEXEC_STUFF): $(TESTBED_SRCDIR)/WEBtemplate.in
clean:
rm -f *.o core
$(INSTALL_DIR)/opsdir/sbin/%: %
@echo "Installing $<"
-mkdir -p $(INSTALL_DIR)/opsdir/sbin
$(INSTALL) $< $@
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2008 University of Utah and the Flux Group.
# All rights reserved.
#
use strict;
use English;
use Getopt::Std;
#
# A hook invoked from boss after a new user is added to ops.
#
sub usage()
{
print "Usage: adduserhook <uid>\n";
exit(-1);
}
my $optlist = "d";
my $debug = 0;
#
# Configure variables
#
my $TB = "@prefix@";
my $TBOPS = "@TBOPSEMAIL@";
#
# Turn off line buffering on output
#
$| = 1;
#
# Untaint the path
#
$ENV{'PATH'} = "/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin";
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
#
# Only real root can run this script.
#
if ($UID != 0) {
die("*** $0:\n".
" Must be root to run this script!\n");
}
#
# Testbed Support libraries
#
use lib "@prefix@/lib";
use libtestbed;
# Protos
#
# Parse command arguments. Once we return from getopts, all that should be
# left are the required arguments.
#
my %options = ();
if (! getopts($optlist, \%options)) {
usage();
}
if (defined($options{"d"})) {
$debug = 1;
}
if (@ARGV != 1) {
usage();
}
my $user = shift(@ARGV);
#
# Add your code here, but remember you are running as root. Be careful.
#
exit(0);
sub fatal($)
{
my($mesg) = $_[0];
die("*** $0:\n".
" $mesg\n");
}
......@@ -28,6 +28,7 @@ my $resend;
#
my $TB = "@prefix@";
my $TBOPS = "@TBOPSEMAIL@";
my $TBAPPROVAL = "@TBAPPROVALEMAIL@";
my $TBAUDIT = "@TBAUDITEMAIL@";
my $TBBASE = "@TBBASE@";
my $TBWWW = "@TBWWW@";
......
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2008 University of Utah and the Flux Group.
# Copyright (c) 2000-2007 University of Utah and the Flux Group.
# All rights reserved.
#
use English;
......@@ -274,29 +274,23 @@ UserError("Email address already in use; please pick another!")
# Check the password.
#
my $pswd = $xmlparse->{'attribute'}->{'password'}->{'value'};
# Admins can "star" the password entry.
if ($this_user->IsAdmin() && $pswd eq "*") {
$newuser_args{'usr_pswd'} = "*";
}
else {
my $checkpass_args = escapeshellarg($pswd);
$checkpass_args .= " " .
(exists($newuser_args{'uid'}) ? $newuser_args{'uid'} : "ignored");
$checkpass_args .= escapeshellarg($newuser_args{'usr_name'} . ":" .
$newuser_args{'usr_email'});
my $checkpass_args = escapeshellarg($pswd);
$checkpass_args .= " " .
(exists($newuser_args{'uid'}) ? $newuser_args{'uid'} : "ignored");
$checkpass_args .= escapeshellarg($newuser_args{'usr_name'} . ":" .
$newuser_args{'usr_email'});
my $pwokay = `$checkpass $checkpass_args`;
if ($?) {
chomp($pwokay);
my $pwokay = `$checkpass $checkpass_args`;
if ($?) {
chomp($pwokay);
if (! ($pwokay =~ /^ok$/)) {
UserError("$pwokay");
}
fatal("Checkpass failed with $?");
if (! ($pwokay =~ /^ok$/)) {
UserError("$pwokay");
}
$newuser_args{'usr_pswd'} = crypt($pswd, "\$1\$" . substr(time(), 0, 8));
fatal("Checkpass failed with $?");
}
$newuser_args{'usr_pswd'} = crypt($pswd, "\$1\$" . substr(time(), 0, 8));
#
# Do a check on the pubkey if supplied. The safest thing to do is generate
......
......@@ -2,7 +2,7 @@
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2008 University of Utah and the Flux Group.
# Copyright (c) 2000-2007 University of Utah and the Flux Group.
# All rights reserved.
#
use English;
......@@ -48,7 +48,6 @@ my $BUGDBSUPPORT= @BUGDBSUPPORT@;
my $OPSDBSUPPORT= @OPSDBSUPPORT@;
my $CHATSUPPORT = @CHATSUPPORT@;
my $MAILMANSUPPORT= @MAILMANSUPPORT@;
my $THISHOMEBASE= "@THISHOMEBASE@";
my $PROTOUSER = 'elabman';
my $SAMBANODE = "fs"; # DNS makes this do the right thing in E-in-E.
......@@ -78,7 +77,6 @@ my $MMMODIFYUSER= "$TB/sbin/mmmodifymember";
my $ADDMMUSER = "$TB/sbin/addmmuser";
my $DELMMUSER = "$TB/sbin/delmmuser";
my $OPSDBCONTROL= "$TB/sbin/opsdb_control";
my $ADDHOOK = "$TB/sbin/adduserhook";
my $NOLOGIN = "/sbin/nologin";
my $SSH = "$TB/bin/sshtb";
my $SAVEUID = $UID;
......@@ -86,8 +84,7 @@ my $NOSUCHUSER = 67;
my $USEREXISTS = 65;
# Nasty. Should do this with /etc/pw.conf shellpath.
my %shellpaths = ("csh" => "/bin/csh", "sh" => "/bin/sh",
"tcsh" => "/bin/tcsh", "bash" => "/usr/local/bin/bash",
"zsh" => "/bin/zsh");
"tcsh" => "/bin/tcsh", "bash" => "/usr/local/bin/bash");
my $errors = 0;
my $sfsupdate = 0;
......@@ -404,16 +401,6 @@ sub AddUser()
if (system("$SSH -host $CONTROL $CHPASS -p '$pswd' $user")) {
fatal("Could not initialize password for user $user on $CONTROL!");
}
#
# Extra hook added for CMU. Generalize later.
#
if ($THISHOMEBASE =~ /^cmuemulab$/i) {
print "Running post create hook for user $user on $CONTROL.\n";
# Do not worry about failure.
system("$SSH -host $CONTROL $ADDHOOK $user");
}
}
$UID = $SAVEUID;
......
......@@ -228,7 +228,6 @@ cout << "Physical Graph: " << parse_ptop(PG,SG,ptopfile) << endl;
// Calculate the minimum spanning tree for the switches - we only consider one
// potential path between each pair of switches.
// XXX: Should soon be replaced by calculate_shortest_routes()
void calculate_switch_MST() {
cout << "Calculating shortest paths on switch fabric." << endl;
......@@ -745,20 +744,6 @@ nosuchtype:
#endif
}
// Perfrom a pre-cehck to make sure that polices that are checkable at precheck
// time are not violated. Returns 1 if everything is A-OK, 0 otherwise
// TODO - move away from using global variables
int policy_precheck() {
cout << "Policy precheck:" << endl;
if (tb_featuredesire::check_desire_policies()) {
cout << "Policy precheck succeeded" << endl;
return 1;
} else {
cout << "*** Policy precheck failed!" << endl;
return 0;
}
}
// Signal handler - add a convneint way to kill assign and make it return an
// unretryable error
void exit_unretryable(int signal) {
......@@ -963,13 +948,7 @@ int main(int argc,char **argv) {
}
}
#endif
// Run the policy precheck - the idea behind running this last is that some
// policy violations might become more clear after doing pruning
if (!policy_precheck()) {
exit(EXIT_UNRETRYABLE);
}
// Bomb out early if we're only doing the prechecks
if (prechecks_only) {
exit(EXIT_SUCCESS);
......
......@@ -25,9 +25,7 @@ tb_featuredesire::tb_featuredesire(fstring _my_name) : my_name(_my_name),
global(false), local(false),
l_additive(false), g_one_is_okay(false),
g_more_than_one(false),
in_use_globally(0), desire_policy(),
feature_policy(), desire_users(0),
desire_total_weight(0.0f) {
in_use_globally(0) {
static int highest_id = 0;
// Pick a unique numeric identifier for this feature/desire
......@@ -114,72 +112,6 @@ void tb_featuredesire::remove_global_user(int howmany) {
assert(in_use_globally >= 0);
}
/*
* Functions for manipulating policies
*/
void tb_featuredesire::disallow_desire() {
desire_policy.disallow();
}
void tb_featuredesire::allow_desire() {
desire_policy.allow();
}
void tb_featuredesire::limit_desire(double limit) {
desire_policy.limit_use(limit);
}
void tb_featuredesire::unlimit_desire() {
desire_policy.unlimit_use();
}
/*
* Bookkeeping functions
*/
void tb_featuredesire::add_desire_user(double weight) {
desire_users++;
desire_total_weight += weight;
}
int tb_featuredesire::get_desire_users() {
return desire_users;
}
double tb_featuredesire::get_desire_total_weight() {
return desire_total_weight;
}
/*
* Check desire violations - true means everything was okay, false otherwise
*/
bool tb_featuredesire::check_desire_policies() {
int errors = 0;
name_featuredesire_map::const_iterator it = featuredesires_by_name.begin();
while (it != featuredesires_by_name.end()) {
tb_featuredesire *fd = it->second;
if (!fd->desire_policy.is_allowable() && fd->desire_users) {
cout << " *** Policy violation: " << endl
<< " Feature " << it->first
<< " requested, but prohibited by policy" << endl;
errors++;
} else {
if (fd->desire_policy.is_limited() &&
(fd->desire_total_weight > fd->desire_policy.get_limit())) {
cout << " *** Policy violation: " << endl
<< " Feature " << it->first
<< " requested with weight " << fd->desire_total_weight
<< " but limted to " << fd->desire_policy.get_limit()
<< " by policy" << endl;
errors++;
}
}
it++;
}
if (errors) {
return false;
} else {
return true;
}
}
/*********************************************************************
* tb_node_featuredesire
*********************************************************************/
......
......@@ -16,44 +16,8 @@
using namespace std;
/*
* This small class is used to describe policies in force regarding features
* and desires. The idea behind putting this it its own class is that you want
* to be able to apply baiscally the same policies to features and desires, but
* treat them seperateley.
*/
class tb_featuredesire_policy {
public:
tb_featuredesire_policy(): allowable(true), limited_use(false),
min_use(0.0f), max_use(0.0f) { ; };
/*
* Functions for maintaining FD policy state. Inline, since they're
* so simple.
*/
void allow() { allowable = true; };
void disallow() { allowable = false; }
bool is_allowable() { return this->allowable; };
void limit_use(double howmuch) { limited_use = true; max_use = howmuch; };
void unlimit_use() { limited_use = false; max_use = 0.0f; }
bool is_limited() { return limited_use; }
double get_limit() { return max_use; }
friend ostream &operator<<(ostream &o, const tb_featuredesire_policy &fdp);
private:
// Indicates whether or not we are allowed to use this feature or
// desire, and if so, how much of it we are allowed to use. Note that
// while these limits are global, this is different from using a global
// FD - it is a policy knob that can be applied in the ptop file
bool allowable;
bool limited_use;
double max_use;
// Note: min_use not implemented, as it's not clear what the point
// would be
double min_use;
};
/*
* Base class for features and desires.
* Base class for features and desires - not intended to be used directly, only
* to be subclassed by tb_feature and tb_desire
*/
class tb_featuredesire {
public:
......@@ -79,7 +43,7 @@ class tb_featuredesire {
inline bool is_g_one() const { return g_one_is_okay; }
inline bool is_g_more() const { return g_more_than_one; }
inline int global_use_count() const { return in_use_globally; }
inline fstring name() const { return my_name; }
inline fstring name() const { return my_name; }
/*
* Operators, primarily for use with the STL
......@@ -99,34 +63,7 @@ class tb_featuredesire {
*/
void add_global_user(int howmany = 1);
void remove_global_user(int howmany = 1);
/*
* Simple bookkeeping
*/
void add_desire_user(double weight);
int get_desire_users();
double get_desire_total_weight();
/*
* Functions for manipulating the policies for features or desires with
* this name.
* NOTE: Only desire policies implement for now
*/
void disallow_desire();
void allow_desire();
void limit_desire(double limit);
void unlimit_desire();
/*
* Check to see if any desires violate policies - this is checkable at
* any time (after all desires and policies have been set up), because
* it is not dependant on the current mapping. Returns true if
* everything is okay, false if not.
* Feature policy violations, which are not yet implemented, will be
* much harder because of thise.
*/
static bool check_desire_policies();
private:
/*
* This is private, so that we can force callers to go through the
......@@ -150,25 +87,11 @@ class tb_featuredesire {
bool l_additive; // If a local FD, is additive
// Counts how many instances of this feature are in use across all
// nodes - for use with global features
// nodes - for use with global nodes
int in_use_globally;
typedef map<fstring,tb_featuredesire*> name_featuredesire_map;
static name_featuredesire_map featuredesires_by_name;
/*
* Policies for using features and desires with the name. NOTE: Only
* feature policies implemented yet, as they are easier to check for.
*/
tb_featuredesire_policy feature_policy;
tb_featuredesire_policy desire_policy;
/*
* Some simple bookkeeping stuff, currently only used to enforce
* policies.
*/
int desire_users;
double desire_total_weight;
};
/*
......@@ -218,9 +141,6 @@ class tb_node_featuredesire {
const bool is_l_additive() const {
return featuredesire_obj->is_l_additive();
}
void add_desire_user(double weight) const {
featuredesire_obj->add_desire_user(weight);
}
score_and_violations add_global_user() const;
score_and_violations remove_global_user() const;
......
......@@ -16,7 +16,7 @@ by Ricci, Alfeld, and Lepreau about assign.
##### ptop (physical topology) file
ptop file: <line>*
<line> ::= <node_line> | <link_line> | <type_limit_line> | <policy_line>
<line> ::= <node_line> | <link_line> | <type_limit_line>
<node_line> ::= node <node_name> <node_type>+ [- <feature>* [- <flag>* ]]
<node_type> ::= "*"?<type_name>:<type_count>
......@@ -30,9 +30,6 @@ ptop file: <line>*
<type_limit_line> ::= set-type-limit <node_type> <int>
<policy_line> ::= policy <desire_policy>
<desire_policy> ::= desire <feature_name> ( disallow | limit <float> )
Interpretation:
<node_line> - though a node can have several types that it can satisfy, it is
......@@ -82,10 +79,6 @@ Interpretation:
file. The other two portions are mostly ignored.
<type_limit_line> - used to enforce Emulab policies: ie. this experiment is
not allowed to use more than 10 pc3000 nodes
<policy_line> - used to indicate policies for mapping the experiment. The only
policies currently supported are 'desire' policies, which can be used to
disallow the top file from requesting a particular desire, or limit the
total weight that can be given to a desire
##### top (virtual topology) file
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2000-2007 University of Utah and the Flux Group.
* Copyright (c) 2000-2006 University of Utah and the Flux Group.
* All rights reserved.
*/
...