diff --git a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java index aeac977cc75..52e52c1e708 100755 --- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java +++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java @@ -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"); }