cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [2/2] git commit: updated refs/heads/4.4 to 0c60ea2
Date Mon, 05 May 2014 12:03:41 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/0c60ea2e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0c60ea2e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0c60ea2e

Branch: refs/heads/4.4
Commit: 0c60ea2e01a80d5201b23415ebef818984db8730
Parents: df0564f
Author: Harikrishna Patnala <harikrishna.patnala@citrix.com>
Authored: Mon Apr 21 15:19:30 2014 +0530
Committer: Daan Hoogland <daan@onecht.net>
Committed: Mon May 5 14:03:22 2014 +0200

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0c60ea2e/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