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/master-6-17-stable to 737a9c3
Date Mon, 01 Jul 2013 19:05:13 GMT
Updated Branches:
  refs/heads/master-6-17-stable 4dcb0fb4f -> 737a9c397


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/737a9c39
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/737a9c39
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/737a9c39

Branch: refs/heads/master-6-17-stable
Commit: 737a9c397755f979bd42a1504bd0b298b4f74825
Parents: 4dcb0fb
Author: Sanjay Tripathi <sanjay.tripathi@citrix.com>
Authored: Fri Jun 28 14:32:27 2013 +0530
Committer: Devdeep Singh <devdeep@gmail.com>
Committed: Mon Jul 1 23:56:53 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/737a9c39/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 4297efb..d36374a 100644
--- a/server/src/com/cloud/storage/VolumeManagerImpl.java
+++ b/server/src/com/cloud/storage/VolumeManagerImpl.java
@@ -1285,7 +1285,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