mirror of https://github.com/apache/cloudstack.git
CS-11945: Allow deleting of snapshots that have errored out. Simply mark the removed column as there is no physiocal clean up required
Reviewed-by: Kishan
This commit is contained in:
parent
27de7bb9fa
commit
a5241c89c7
|
|
@ -692,6 +692,10 @@ public class SnapshotManagerImpl implements SnapshotManager, SnapshotService, Ma
|
|||
if (snapshotCheck == null) {
|
||||
throw new InvalidParameterValueException("unable to find a snapshot with id " + snapshotId);
|
||||
}
|
||||
if( Status.Error.equals(snapshotCheck.getStatus() ) ) {
|
||||
_snapshotDao.remove(snapshotId);
|
||||
return true;
|
||||
}
|
||||
if( !Status.BackedUp.equals(snapshotCheck.getStatus() ) ) {
|
||||
throw new InvalidParameterValueException("Can't delete snapshotshot " + snapshotId + " due to it is not in BackedUp Status");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue