cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From devd...@apache.org
Subject [3/3] git commit: updated refs/heads/4.2 to a98c0f5
Date Fri, 19 Jul 2013 10:57:50 GMT
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/a98c0f5b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a98c0f5b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a98c0f5b

Branch: refs/heads/4.2
Commit: a98c0f5b89533e9e8d3ef671c994ff9528aa5665
Parents: 5de96db
Author: Sanjay Tripathi <sanjay.tripathi@citrix.com>
Authored: Mon Jul 15 14:37:54 2013 +0530
Committer: Devdeep Singh <devdeep@gmail.com>
Committed: Fri Jul 19 16:19:41 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/a98c0f5b/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 54c2a0c..cc2989a 100644
--- a/server/src/com/cloud/storage/VolumeManagerImpl.java
+++ b/server/src/com/cloud/storage/VolumeManagerImpl.java
@@ -1345,7 +1345,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 {


Mime
View raw message