Commit 9087ae94 authored by Leigh Stoller's avatar Leigh Stoller

Add -f (force) option to ignore experiments in transition, use with

caution.
parent bf26c03b
#!/usr/bin/perl -w
#
# Copyright (c) 2010-2017 University of Utah and the Flux Group.
# Copyright (c) 2010-2018 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -31,12 +31,14 @@ use Data::Dumper;
#
sub usage()
{
print STDERR "Usage: testbed-control [-n] shutdown|boot|restart\n";
print STDERR "Usage: testbed-control [-nf] shutdown|boot|restart\n";
print STDERR "Use -n option to leave logins disabled after restart.\n";
print STDERR "Use -f option to force shutdown (ignore current swapping)\n";
exit(-1);
}
my $optlist = "n";
my $optlist = "nf";
my $noenable = 0;
my $force = 0;
my $stopped = 0;
my $committed = 0;
......@@ -206,7 +208,7 @@ print "-> Looking for experiments still in transition.\n";
# safe way to do it. Don't worry about any experiments that are older
# then 24 hours though; they are likely stuck and not going anywhere.
#
while (1) {
while (!$force) {
my $query_result =
DBQueryWarn("select pid,eid,idx,state,expt_locked ".
" from experiments ".
......
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