Skip to content

Commit 37c91ab

Browse files
NPE fix, for test_hostha_kvm_host_fencing (#9355)
1 parent ca66b76 commit 37c91ab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

server/src/main/java/com/cloud/capacity/CapacityManagerImpl.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,8 @@ public void updateCapacityForHost(final Host host, final Map<Long, ServiceOfferi
718718
if (vmDetailCpu != null) {
719719
//if vmDetail_cpu is not null it means it is running in a overcommited cluster.
720720
cpuOvercommitRatio = Float.parseFloat(vmDetailCpu.getValue());
721+
}
722+
if (vmDetailRam != null) {
721723
ramOvercommitRatio = Float.parseFloat(vmDetailRam.getValue());
722724
}
723725
ServiceOffering so = offeringsMap.get(vm.getServiceOfferingId());

0 commit comments

Comments
 (0)