mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-2932
Allow deleting of snapshots that have errored out. Simply mark the removed column as there is no physiocal clean up required
This commit is contained in:
parent
7b63894a0a
commit
07e5cbe813
@ -536,6 +536,11 @@ public class AncientSnapshotStrategy implements SnapshotStrategy {
|
||||
Long snapshotId = snapInfo.getId();
|
||||
SnapshotObject snapshot = (SnapshotObject)snapInfo;
|
||||
|
||||
if (Snapshot.State.Error.equals(snapshot.getState())) {
|
||||
_snapshotDao.remove(snapshotId);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!Snapshot.State.BackedUp.equals(snapshot.getState())) {
|
||||
throw new InvalidParameterValueException("Can't delete snapshotshot " + snapshotId + " due to it is not in BackedUp Status");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user