Commit 288e7bb9 authored by Leigh B Stoller's avatar Leigh B Stoller

Do not send XMLRPC to terminate a terminated sliver.

parent 3a668bcb
...@@ -732,6 +732,9 @@ sub DoTerminate() ...@@ -732,6 +732,9 @@ sub DoTerminate()
my $urn = $sliver->aggregate_urn(); my $urn = $sliver->aggregate_urn();
my $errmsg; my $errmsg;
return 0
if ($sliver->status() eq "terminated");
my $response = $sliver->Terminate(); my $response = $sliver->Terminate();
if (!defined($response)) { if (!defined($response)) {
$errmsg = "RPC Error calling Terminate"; $errmsg = "RPC Error calling Terminate";
...@@ -748,11 +751,14 @@ sub DoTerminate() ...@@ -748,11 +751,14 @@ sub DoTerminate()
$errmsg = "Could not delete slice: ". $response->output(); $errmsg = "Could not delete slice: ". $response->output();
goto bad; goto bad;
} }
$instance->SetStatus("terminated");
return 0; return 0;
bad: bad:
print STDERR "$urn: $errmsg\n"; print STDERR "$urn: $errmsg\n";
return -1; return -1;
}; };
print STDERR Dumper($instance);
my @return_codes = (); my @return_codes = ();
my @agglist = $instance->AggregateList(); my @agglist = $instance->AggregateList();
if (ParRun({"maxwaittime" => 99999, if (ParRun({"maxwaittime" => 99999,
......
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