Commit cffffcab authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Check to see if Lease is InUse(), so that we can return a BUSY

error instead of a generic failure, which we can pass to the user.
parent b3783264
......@@ -4482,6 +4482,14 @@ sub DeleteDataset($)
if (GeniResponse::IsResponse($dataset));
if (ref($dataset) eq "Lease") {
# If the lease is in use, return a busy error.
# We make this test unlocked, but that is okay.
if ($dataset->InUse()) {
return GeniResponse->Create(GENIRESPONSE_BUSY, undef,
"$dataset is in use, try again later");
$cmd = "$DELETEDATASET -b -f " .
$dataset->pid() . "/" . $dataset->gid() . "/" . $dataset->lease_id();
Supports Markdown
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