Commit 3732efdd authored by Jonathon Duerig's avatar Jonathon Duerig

Added script for orchestrating standalone running with pssh

parent 7e71e402
......@@ -2,7 +2,7 @@
Running in Standalone Mode
--------------------------
run-standalone <run-level> <run-path> <log-path> <host-list> [node-list]
run-standalone <run-level> <run-path> <var-path> <log-path> <host-list> [node-list]
Uses pssh to simultaneously run linktest in standalone mode for all
hosts listed.
......@@ -10,7 +10,8 @@ hosts listed.
run-level -- An integer betweeen 1 and 4 with higher numbers
performing more tests (see:
http://users.emulab.net/trac/emulab/wiki/linktest).
run-path -- Contains the standalone package (manifest described below).
run-path -- Contains execution package (manifest described below).
var-path -- Contains configuration files (manifest described below).
log-path -- An empty directory where low-level error logs are kept.
host-list -- Comma-delimeted list of hostnames to run on.
node-list -- If the nodes have different control and experimental
......@@ -25,7 +26,7 @@ Note: Currently node names (those listed in the node-list and the
nickname and syncserver hostname described below) are all assumed to
be a single unqualified name (like node-0).
standalone.sh <run-level> <run-path> <log-path> <node-list>
standalone.sh <run-level> <run-path> <var-path> <log-path> <node-list>
Invokes linktest with the appropriate arguments.
......@@ -34,7 +35,7 @@ Invokes linktest with the appropriate arguments.
Standalone Package Manifest
---------------------------
Executables:
Executables in run-path:
standalone.sh -- Invokes linktest in standalone mode
linktest.pl -- Main linktest script
......@@ -45,7 +46,7 @@ bin/emulab-sync -- Sync client for synchronizing different clients
-------------------------------------------------------------------------------
Configuration:
Configuration in var-path:
boot/nickname -- Contains a single line with the hostname of the
experimental interface on this node.
......
......@@ -39,6 +39,7 @@ sub usage()
" [LOGDIR=<path/to/log/root>]\n".
" [BINDIR=<path/to/binary/files>]\n".
" [VARDIR=<path/to/config/files>]\n".
" [STANDALONE=<1|0>]\n".
" [EVENTSERVER=<eventserver hostname>]\n");
print(" <test step>: 1=conn/latency, 2=routing, 3=loss, 4=BW\n".
" COMPAT=<version>: remain compatible with version <version> or earlier\n".
......@@ -240,6 +241,7 @@ our $LOGDIR = "";
our $SHAREDDIR = "";
our $EVENTSERVER = "";
our $EVENTID = "";
our $STANDALONE = 0;
#
# Parse command arguments. Since Linktest is run via the event system,
......@@ -295,6 +297,11 @@ foreach my $arg (@ARGV) {
if($arg =~ /EVENTSERVER=(.+)/) {
$EVENTSERVER = $1;
}
if ($arg =~ /STANDALONE=(.+)/) {
if ($1 eq "1") {
$STANDALONE = 1;
}
}
}
$compat = 99
......@@ -378,7 +385,9 @@ $ptopology_file = $PATH_PTOPOFILE;
# the NFS server.
#
sleep(int(rand(5)));
&my_system($PATH_RCTOPO, "reconfig");
if (! $STANDALONE) {
&my_system($PATH_RCTOPO, "reconfig");
}
&get_topo($topology_file, $ptopology_file);
&debug_top();
......
#!/usr/bin/perl -w -T
($level, $runpath, $varpath, $logpath, $hosts, $nodes) = @ARGV;
open HOSTS, ">hosts.txt";
@hostList = split(",", $hosts);
print HOSTS join("\n", @hostList);
close HOSTS;
if (! defined($nodes)) {
$nodes = $hosts;
}
$command = "pssh -h hosts.txt -o out -e err -t 3000 sh $runpath/standalone.sh $level $runpath $varpath $logpath $nodes";
system($command);
sudo perl -w -T /proj/tbres/duerig/src/event/linktest/linktest.pl STARTAT=1 STOPAT=$1 DOARP=0 LOGDIR=$3 BINDIR=$2 VARDIR=$2
sudo perl -w -T /proj/tbres/duerig/src/event/linktest/linktest.pl STARTAT=1 STOPAT=$1 DOARP=0 LOGDIR=$4 BINDIR=$2 VARDIR=$3 STANDALONE=1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment