allow delete snapshot with ERROR state

Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/81c07f17
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/81c07f17
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/81c07f17

Branch: refs/heads/master
Commit: 81c07f179103e19a0607a6d1a718f28ffc1874ae
Parents: d473d5a
Author: Wei Zhou <[email protected]>
Authored: Thu Nov 28 10:48:07 2013 +0100
Committer: Wei Zhou <[email protected]>
Committed: Thu Nov 28 10:48:07 2013 +0100

----------------------------------------------------------------------
 .../cloudstack/storage/snapshot/XenserverSnapshotStrategy.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/81c07f17/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java
----------------------------------------------------------------------
diff --git 
a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java
 
b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java
index 22182b1..14fb618 100644
--- 
a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java
+++ 
b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java
@@ -201,7 +201,7 @@ public class XenserverSnapshotStrategy extends 
SnapshotStrategyBase {
             return true;
         }
 
-        if (!Snapshot.State.BackedUp.equals(snapshotVO.getState())) {
+        if (!Snapshot.State.BackedUp.equals(snapshotVO.getState()) && 
!Snapshot.State.Error.equals(snapshotVO.getState())) {
             throw new InvalidParameterValueException("Can't delete 
snapshotshot " + snapshotId + " due to it is in " + snapshotVO.getState() + " 
Status");
         }
 

Reply via email to