Commit 2519941f authored by Robert Ricci's avatar Robert Ricci

Comment out all the stuff to change stub command and command-line

arguments - we haven't been using them.
parent ea284aa9
......@@ -72,41 +72,41 @@ if (grep /No such experiment/, @expinfo) {
die "*** ERROR: Experiment is not swapped in!\n";
}
$stub_cmdargs = get_cmdargs("plab", $stub_cmd);
$mon_cmdargs = get_cmdargs("elab", $mon_cmd);
if (defined($options{"S"})) {
$stub_cmdargs = $options{"S"};
}
if (defined($options{"s"})) {
if ($stub_cmdargs eq $UNKNOWN) {
$stub_cmdargs = $options{"s"};
} else {
$stub_cmdargs .= " " . $options{"s"};
}
}
if (defined($options{"M"})) {
$mon_cmdargs = $options{"M"};
}
if (defined($options{"m"})) {
if ($mon_cmdargs eq $UNKNOWN) {
$mon_cmdargs = $options{"m"};
} else {
$mon_cmdargs .= " " . $options{"m"};
}
}
if (defined($options{"C"})) {
my $cmdline = $stub_cmd;
if ($stub_cmdargs ne $UNKNOWN) {
$cmdline .= " $stub_cmdargs";
}
print "Current stub command line: '$cmdline'\n";
$cmdline = $mon_cmd;
if ($mon_cmdargs ne $UNKNOWN) {
$cmdline .= " $mon_cmdargs";
}
print "Current monitor command line: '$cmdline'\n";
}
#$stub_cmdargs = get_cmdargs("plab", $stub_cmd);
#$mon_cmdargs = get_cmdargs("elab", $mon_cmd);
#if (defined($options{"S"})) {
# $stub_cmdargs = $options{"S"};
#}
#if (defined($options{"s"})) {
# if ($stub_cmdargs eq $UNKNOWN) {
# $stub_cmdargs = $options{"s"};
# } else {
# $stub_cmdargs .= " " . $options{"s"};
# }
#}
#if (defined($options{"M"})) {
# $mon_cmdargs = $options{"M"};
#}
#if (defined($options{"m"})) {
# if ($mon_cmdargs eq $UNKNOWN) {
# $mon_cmdargs = $options{"m"};
# } else {
# $mon_cmdargs .= " " . $options{"m"};
# }
#}
#if (defined($options{"C"})) {
# my $cmdline = $stub_cmd;
# if ($stub_cmdargs ne $UNKNOWN) {
# $cmdline .= " $stub_cmdargs";
# }
# print "Current stub command line: '$cmdline'\n";
#
# $cmdline = $mon_cmd;
# if ($mon_cmdargs ne $UNKNOWN) {
# $cmdline .= " $mon_cmdargs";
# }
# print "Current monitor command line: '$cmdline'\n";
#}
if (defined($options{"p"})) {
$realplab = 1;
if ($mon_cmdargs eq $UNKNOWN) {
......@@ -120,32 +120,32 @@ if (defined($options{"i"})) {
print "WARNING: -i only makes sense with -p\n"
if (!$realplab);
}
if (defined($options{"N"})) {
if ($options{"N"} eq "s") {
$stub_cmd = "/bin/sh /local/pelab/magent/auto-magent.sh";
$stub_cmdargs = ""
if ($stub_cmdargs eq $UNKNOWN);
} elsif ($options{"N"} eq "m") {
$mon_cmd = "/bin/sh /local/pelab/dbmonitor/auto-dbmonitor.sh";
$mon_cmdargs = ""
if ($mon_cmdargs eq $UNKNOWN);
} else {
die "Unknown -N type '", $options{"N"}, "'\n";
}
}
if (defined($options{"O"})) {
if ($options{"O"} eq "s") {
$stub_cmd = "/bin/sh /local/pelab/stub/auto-stub.sh";
$stub_cmdargs = ""
if ($stub_cmdargs eq $UNKNOWN);
} elsif ($options{"O"} eq "m") {
$mon_cmd = "/bin/sh /local/pelab/monitor/auto-monitor.sh";
$mon_cmdargs = ""
if ($mon_cmdargs eq $UNKNOWN);
} else {
die "Unknown -O type '", $options{"O"}, "'\n";
}
}
#if (defined($options{"N"})) {
# if ($options{"N"} eq "s") {
# $stub_cmd = "/bin/sh /local/pelab/magent/auto-magent.sh";
# $stub_cmdargs = ""
# if ($stub_cmdargs eq $UNKNOWN);
# } elsif ($options{"N"} eq "m") {
# $mon_cmd = "/bin/sh /local/pelab/dbmonitor/auto-dbmonitor.sh";
# $mon_cmdargs = ""
# if ($mon_cmdargs eq $UNKNOWN);
# } else {
# die "Unknown -N type '", $options{"N"}, "'\n";
# }
#}
#if (defined($options{"O"})) {
# if ($options{"O"} eq "s") {
# $stub_cmd = "/bin/sh /local/pelab/stub/auto-stub.sh";
# $stub_cmdargs = ""
# if ($stub_cmdargs eq $UNKNOWN);
# } elsif ($options{"O"} eq "m") {
# $mon_cmd = "/bin/sh /local/pelab/monitor/auto-monitor.sh";
# $mon_cmdargs = ""
# if ($mon_cmdargs eq $UNKNOWN);
# } else {
# die "Unknown -O type '", $options{"O"}, "'\n";
# }
#}
my $use_magent = ($stub_cmd =~ /magent/) ? 1 : 0;
my $use_simplemodel = ($mon_cmd =~ /dbmonitor/) ? 1 : 0;
......@@ -157,6 +157,7 @@ print "##### Stashing node list for experiment\n";
my @vnodes = split /\s+/,`$NODELIST -v -e $pid,$eid`;
my $hasfakeplab = grep /plab-\d+/, @vnodes;
my $hasrealplab = grep /planet-\d+/, @vnodes;
print "HFPL = $hasfakeplab HRPL = $hasrealplab RPL = $realplab\n";
if (!$hasfakeplab && $hasrealplab && !$realplab) {
die "*** ERROR: Forgot to specify -p!\n";
} elsif ($hasfakeplab && !$hasrealplab && $realplab) {
......@@ -286,37 +287,42 @@ if (system "$TEVC -e $pid/$eid now tdhosts start") {
#
# Start up the stubs and monitors
#
my $startarg = "";
#my $startarg = "";
print "##### Starting stubs";
if ($initelab && $use_magent) {
$stub_cmdargs += " /proj/$pid/exp/$eid/tmp/initial-conditions.txt ";
}
if ($stub_cmdargs ne $UNKNOWN) {
print " with: '$stub_cmd $stub_cmdargs'";
$startarg = "'COMMAND=$stub_cmd $stub_cmdargs'";
}
print "\n";
#if ($initelab && $use_magent) {
# $stub_cmdargs += " /proj/$pid/exp/$eid/tmp/initial-conditions.txt ";
#}
#if ($stub_cmdargs ne $UNKNOWN) {
# print " with: '$stub_cmd $stub_cmdargs'";
# $startarg = "'COMMAND=$stub_cmd $stub_cmdargs'";
#}
#print "\n";
if ($realplab) {
if (system "$TEVC -e $pid/$eid now planetstubs start $startarg") {
if (system "$TEVC -e $pid/$eid now planetstubs start") {
die "Error running tevc\n";
}
} else {
if (system "$TEVC -e $pid/$eid now plabstubs start $startarg") {
if (system "$TEVC -e $pid/$eid now plabstubs start") {
die "Error running tevc\n";
}
}
$startarg = "";
print "##### Starting monitors";
if ($mon_cmdargs ne $UNKNOWN) {
print " with: '$mon_cmd $mon_cmdargs'";
$startarg = "'COMMAND=$mon_cmd $mon_cmdargs'";
}
print "\n";
if (system "$TEVC -e $pid/$eid now monitorgroup start $startarg") {
#$startarg = "";
print "##### Starting monitors\n";
#if ($mon_cmdargs ne $UNKNOWN) {
# print " with: '$mon_cmd $mon_cmdargs'";
# $startarg = "'COMMAND=$mon_cmd $mon_cmdargs'";
#}
#print "\n";
if (system "$TEVC -e $pid/$eid now monitorgroup start") {
die "Error running tevc\n";
}
#print "##### Starting tcpdumps";
#if (system "$TEVC -e $pid/$eid now plabtcpdump start") {
# die "Error running tevc\n";
#}
print "##### Done\n";
exit(0);
......
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