cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kis...@apache.org
Subject [4/4] git commit: updated refs/heads/4.4-forward to 508e3e2
Date Mon, 05 May 2014 06:54:44 GMT
CLOUDSTACK-6466: cpu and ram is not getting updated correctly in usage_vm_instance table for
usage type 2


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

Branch: refs/heads/4.4-forward
Commit: 508e3e2c9b08850049a046bc5a22941e481fad5e
Parents: ce3074e
Author: Harikrishna Patnala <harikrishna.patnala@citrix.com>
Authored: Mon Apr 21 15:19:30 2014 +0530
Committer: Kishan Kavala <kishan@cloud.com>
Committed: Mon May 5 12:11:35 2014 +0530

----------------------------------------------------------------------
 usage/src/com/cloud/usage/UsageManagerImpl.java | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/508e3e2c/usage/src/com/cloud/usage/UsageManagerImpl.java
----------------------------------------------------------------------
diff --git a/usage/src/com/cloud/usage/UsageManagerImpl.java b/usage/src/com/cloud/usage/UsageManagerImpl.java
index 6ce6901..4ceecbb 100644
--- a/usage/src/com/cloud/usage/UsageManagerImpl.java
+++ b/usage/src/com/cloud/usage/UsageManagerImpl.java
@@ -1205,16 +1205,22 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager,
Runna
         UsageEventDetailsVO cpuNumber = _usageEventDetailsDao.findDetail(eventId, UsageEventVO.DynamicParameters.cpuNumber.name());
         if (cpuNumber != null) {
             usageInstance.setCpuCores(Long.parseLong(cpuNumber.getValue()));
+        } else {
+            usageInstance.setCpuCores(null);
         }
 
         UsageEventDetailsVO cpuSpeed = _usageEventDetailsDao.findDetail(eventId, UsageEventVO.DynamicParameters.cpuSpeed.name());
         if (cpuSpeed != null) {
             usageInstance.setCpuSpeed(Long.parseLong(cpuSpeed.getValue()));
+        } else {
+            usageInstance.setCpuSpeed(null);
         }
 
         UsageEventDetailsVO memory = _usageEventDetailsDao.findDetail(eventId, UsageEventVO.DynamicParameters.memory.name());
         if (memory != null) {
             usageInstance.setMemory(Long.parseLong(memory.getValue()));
+        } else {
+            usageInstance.setMemory(null);
         }
         _usageInstanceDao.persist(usageInstance);
     }


Mime
View raw message