This is an automated email from the ASF dual-hosted git repository.

sureshanaparti pushed a commit to branch 4.19
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.19 by this push:
     new 37c91abd3d4 NPE fix, for test_hostha_kvm_host_fencing (#9355)
37c91abd3d4 is described below

commit 37c91abd3d4f306cb53fdbe33a37680a5b1f230e
Author: Suresh Kumar Anaparti <sureshkumar.anapa...@gmail.com>
AuthorDate: Tue Jul 9 12:20:10 2024 +0530

    NPE fix, for test_hostha_kvm_host_fencing (#9355)
---
 server/src/main/java/com/cloud/capacity/CapacityManagerImpl.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/server/src/main/java/com/cloud/capacity/CapacityManagerImpl.java 
b/server/src/main/java/com/cloud/capacity/CapacityManagerImpl.java
index 6926f67daea..221f054e9bb 100644
--- a/server/src/main/java/com/cloud/capacity/CapacityManagerImpl.java
+++ b/server/src/main/java/com/cloud/capacity/CapacityManagerImpl.java
@@ -718,6 +718,8 @@ public class CapacityManagerImpl extends ManagerBase 
implements CapacityManager,
                 if (vmDetailCpu != null) {
                     //if vmDetail_cpu is not null it means it is running in a 
overcommited cluster.
                     cpuOvercommitRatio = 
Float.parseFloat(vmDetailCpu.getValue());
+                }
+                if (vmDetailRam != null) {
                     ramOvercommitRatio = 
Float.parseFloat(vmDetailRam.getValue());
                 }
                 ServiceOffering so = 
offeringsMap.get(vm.getServiceOfferingId());

Reply via email to