cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthon...@apache.org
Subject [14/27] git commit: updated refs/heads/master to d4d5cab
Date Fri, 28 Mar 2014 23:35:21 GMT
CLOUDSTACK-5828: if snapshot deletion failed, such as can't find it on secondary storage, should
return succeed.


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

Branch: refs/heads/master
Commit: 8583b70f2a031c8d812cf6dc95648c974fe3bc95
Parents: f79ba98
Author: edison <sudison@gmail.com>
Authored: Wed Jan 8 14:35:15 2014 -0800
Committer: Anthony Xu <anthony.xu@citrix.com>
Committed: Fri Mar 28 16:22:49 2014 -0700

----------------------------------------------------------------------
 server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java     | 2 +-
 .../cloudstack/storage/resource/NfsSecondaryStorageResource.java   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8583b70f/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
index 6bf4817..388a952 100755
--- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
+++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
@@ -599,7 +599,7 @@ public class SnapshotManagerImpl extends ManagerBase implements SnapshotManager,
                 SnapshotDataStoreVO snapshotStoreRef = _snapshotStoreDao.findBySnapshot(snapshot.getId(),
DataStoreRole.Image);
 
                 if (snapshotStrategy.deleteSnapshot(snapshot.getId())) {
-                    if (snapshot.getRecurringType() == Type.MANUAL) {
+                    if (Type.MANUAL == snapshot.getRecurringType()) {
                         _resourceLimitMgr.decrementResourceCount(accountId, ResourceType.snapshot);
                         _resourceLimitMgr.decrementResourceCount(accountId, ResourceType.secondary_storage,
new Long(snapshotStoreRef.getSize()));
                     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8583b70f/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
----------------------------------------------------------------------
diff --git a/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
b/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
index 9782c2e..f35b3f5 100755
--- a/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
+++ b/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
@@ -1278,7 +1278,7 @@ public class NfsSecondaryStorageResource extends ServerResourceBase
implements S
             if (!snapshotDir.exists()) {
                 details = "snapshot directory " + snapshotDir.getName() + " doesn't exist";
                 s_logger.debug(details);
-                return new Answer(cmd, false, details);
+                return new Answer(cmd, true, details);
             }
             // delete snapshot in the directory if exists
             String lPath = absoluteSnapshotPath + "/*" + snapshotName + "*";


Mime
View raw message