You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ed...@apache.org on 2014/01/08 23:35:42 UTC
git commit: updated refs/heads/4.3 to b180717
Updated Branches:
refs/heads/4.3 f438f55ab -> b18071747
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/b1807174
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b1807174
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b1807174
Branch: refs/heads/4.3
Commit: b18071747369f999a4d24fbad51325bd3116d754
Parents: f438f55
Author: edison <su...@gmail.com>
Authored: Wed Jan 8 14:35:15 2014 -0800
Committer: edison <su...@gmail.com>
Committed: Wed Jan 8 14:35:15 2014 -0800
----------------------------------------------------------------------
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/b1807174/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 33873ac..52297c9 100755
--- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
+++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
@@ -615,7 +615,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/b1807174/services/secondary-storage/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
----------------------------------------------------------------------
diff --git a/services/secondary-storage/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java b/services/secondary-storage/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
index b158fce..f90309d 100755
--- a/services/secondary-storage/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
+++ b/services/secondary-storage/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
@@ -1381,7 +1381,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 + "*";