Commit 7f0d7a1e authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add some force options to make sure I can get instances experiments

swapped out event when endrun fails for some reason.
parent 4528e30c
......@@ -43,12 +43,13 @@ sub usage()
"<guid/vers> - GUID and version to swapin\n");
exit(-1);
}
my $optlist = "qwx:p:E:a:r:e:dscft:";
my $optlist = "qwx:p:E:a:r:e:dscft:i";
my %options = ();
my $quiet = 0;
my $waitmode = 0;
my $debug = 0;
my $foreground = 0;
my $ignoreerrors = 0;
my $clean = 0;
my $paramfile;
my %parameters = ();
......@@ -362,10 +363,12 @@ if (defined($instance->runidx())) {
# This runs loghole.
print "Asking loghole to sync the logfiles ... this will take a minute.\n";
$instance->LogHole() == 0
or $ignoreerrors
or fatal(-1, "Loghole failed");
print "Dumping the instance database ... this will take a minute.\n";
$instance->DumpDB() == 0
or $ignoreerrors
or fatal(-1, "Dump Database failed");
#
......@@ -576,6 +579,9 @@ sub ParseArgs()
if (defined($options{"c"})) {
$clean = 1;
}
if (defined($options{"i"})) {
$ignoreerrors = 1;
}
if (defined($options{"t"})) {
$ctoken = $options{"t"};
......@@ -691,6 +697,7 @@ sub SignalProgAgents($)
}
system("$tevc -w -t 60 -e $pid/$eid now $agent $action") == 0
or $ignoreerrors
or fatal(-1, "Could not send event notification!");
}
......
......@@ -34,9 +34,10 @@ sub usage()
"<guid/vers> - GUID and version to swapin\n");
exit(-1);
}
my $optlist = "qwaie:b";
my $optlist = "qwaie:bf";
my %options = ();
my $quiet = 0;
my $force = 0;
my $waitmode = 0;
my $batchmode = 0; # Called from the batch daemon.
my $eid;
......@@ -258,7 +259,9 @@ if ($waitmode) {
#
# Stop the current run.
#
system("$endrun -a stop -f -e $eid $guid/$version") == 0
my $opt = ($force ? "-i" : "");
system("$endrun $opt -a stop -f -e $eid $guid/$version") == 0
or fatal(-1, "Could not stop the current run!");
# This sets the stop time.
......@@ -340,6 +343,9 @@ sub ParseArgs()
if (defined($options{"b"})) {
$batchmode = 1;
}
if (defined($options{"f"})) {
$force = 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