allow delete snapshot with ERROR state
(cherry picked from commit 81c07f179103e19a0607a6d1a718f28ffc1874ae)

Conflicts:

        
engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java


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

Branch: refs/heads/4.3
Commit: 5598ba0fc751c9d28d4c29694bb7c6fe35b484c2
Parents: c8f6a36
Author: Wei Zhou <[email protected]>
Authored: Fri Nov 29 10:55:33 2013 +0100
Committer: Wei Zhou <[email protected]>
Committed: Fri Nov 29 10:55:33 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/5598ba0f/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 69900af..b5a11d8 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
@@ -202,7 +202,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