You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by de...@apache.org on 2013/07/19 12:44:16 UTC
[3/3] git commit: updated refs/heads/master to 3771e8a
CLOUDSTACK-3496: [Regression]Primary Storage resource usage is not getting updated if detached volume is deleted
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3771e8a0
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3771e8a0
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3771e8a0
Branch: refs/heads/master
Commit: 3771e8a0e61385aa6bda0fd73afa961b6a6cb091
Parents: 539eb38
Author: Sanjay Tripathi <sa...@citrix.com>
Authored: Mon Jul 15 14:37:54 2013 +0530
Committer: Devdeep Singh <de...@gmail.com>
Committed: Fri Jul 19 16:04:36 2013 +0530
----------------------------------------------------------------------
server/src/com/cloud/storage/VolumeManagerImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3771e8a0/server/src/com/cloud/storage/VolumeManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/VolumeManagerImpl.java b/server/src/com/cloud/storage/VolumeManagerImpl.java
index 0f7086b..7b44c5c 100644
--- a/server/src/com/cloud/storage/VolumeManagerImpl.java
+++ b/server/src/com/cloud/storage/VolumeManagerImpl.java
@@ -1342,7 +1342,7 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager {
ResourceType.volume);
/* If volume is in primary storage, decrement primary storage count else decrement secondary
storage count (in case of upload volume). */
- if (volume.getFolder() != null || volume.getState() == Volume.State.Allocated) {
+ if (volume.getFolder() != null || volume.getPath() != null || volume.getState() == Volume.State.Allocated) {
_resourceLimitMgr.decrementResourceCount(volume.getAccountId(), ResourceType.primary_storage,
new Long(volume.getSize()));
} else {