Commit 91d58e2f authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

If the snapshot fails when creating a new imdataset, be sure to clean

up at the remote cluster.
parent c13c4c14
......@@ -354,8 +354,17 @@ sub DoCreate()
if ($type eq "imdataset" &&
DoSnapShotInternal($dataset, $aggregate,
$bsname, $nodeid, \$errmsg)) {
$response = $dataset->DeleteDataset();
if ($response->code() == GENIRESPONSE_SUCCESS ||
$response->code() == GENIRESPONSE_SEARCHFAILED) {
goto failed;
# We want to keep the local dataset record around since we could
# not delete it remotely.
goto failed;
# This will set the webtask, see below.
if (PollDatasetStatus($dataset, \$errmsg)) {
# Exit and let child poll
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