cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From devd...@apache.org
Subject git commit: updated refs/heads/4.2 to af4eb22
Date Mon, 01 Jul 2013 19:48:00 GMT
Updated Branches:
  refs/heads/4.2 b1a34ef33 -> af4eb22a6


CLOUDSTACK-3189: Primary storage usage is not getting decremented after deleting the DATA
volumes.
When a volume is created the resource usage for it gets incremented. If it is deleted without
being
attached to a volume, the decrement doesn't take place. Fixed the delete volume code to decrement
resource usage for a volume in allocated state too.


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

Branch: refs/heads/4.2
Commit: af4eb22a6539b9c25f6b9df2aa110bf099283cbb
Parents: b1a34ef
Author: Sanjay Tripathi <sanjay.tripathi@citrix.com>
Authored: Fri Jun 28 14:32:27 2013 +0530
Committer: Devdeep Singh <devdeep@gmail.com>
Committed: Tue Jul 2 00:39:27 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/af4eb22a/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 30fb322..d90e798 100644
--- a/server/src/com/cloud/storage/VolumeManagerImpl.java
+++ b/server/src/com/cloud/storage/VolumeManagerImpl.java
@@ -1347,7 +1347,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) {
+                    if (volume.getFolder() != null || volume.getState() == Volume.State.Allocated)
{
                         _resourceLimitMgr.decrementResourceCount(volume.getAccountId(), ResourceType.primary_storage,
                                 new Long(volume.getSize()));
                     } else {


Mime
View raw message