Commit 19b7de04 authored by Leigh B Stoller's avatar Leigh B Stoller

Do not leave slice locked on failure, since use cannot then delete it.

parent c147dcf5
...@@ -642,7 +642,6 @@ while ($seconds > 0) { ...@@ -642,7 +642,6 @@ while ($seconds > 0) {
} }
elsif ($blob->{'status'} eq "failed") { elsif ($blob->{'status'} eq "failed") {
$failed = 1; $failed = 1;
$instance->SetStatus("failed");
last; last;
} }
} }
...@@ -652,15 +651,19 @@ print STDERR "$public_url\n" ...@@ -652,15 +651,19 @@ print STDERR "$public_url\n"
print STDERR "\n"; print STDERR "\n";
print STDERR "$manifest\n\n"; print STDERR "$manifest\n\n";
if ($failed) { if ($failed || !$ready) {
fatal("$slice_urn failed.");
}
elsif (!$ready) {
$instance->SetStatus("failed"); $instance->SetStatus("failed");
fatal("$slice_urn timed out."); if (!$ready) {
print STDERR "$slice_urn timed out.\n";
}
else {
print STDERR "$slice_urn failed.\n";
}
}
else {
$instance->SetStatus("ready");
} }
$slice->UnLock(); $slice->UnLock();
$instance->SetStatus("ready");
exit(0); exit(0);
sub fatal($) { sub fatal($) {
......
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