You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/03/16 09:54:03 UTC

[GitHub] [cloudstack] ravening commented on a change in pull request #4779: Fix NPE while cloudstack agent failed to connect to mgt server

ravening commented on a change in pull request #4779:
URL: https://github.com/apache/cloudstack/pull/4779#discussion_r595014095



##########
File path: server/src/main/java/com/cloud/capacity/CapacityManagerImpl.java
##########
@@ -665,11 +665,10 @@ public void updateCapacityForHost(final Host host, final Map<Long, ServiceOfferi
             Map<String, String> vmDetails = _userVmDetailsDao.listDetailsKeyPairs(vm.getId());
             String vmDetailCpu = vmDetails.get("cpuOvercommitRatio");
             String vmDetailRam = vmDetails.get("memoryOvercommitRatio");
-            if (vmDetailCpu != null) {
-                //if vmDetail_cpu is not null it means it is running in a overcommited cluster.
-                cpuOvercommitRatio = Float.parseFloat(vmDetailCpu);
-                ramOvercommitRatio = Float.parseFloat(vmDetailRam);
-            }
+            //if vmDetail_cpu is not null it means it is running in a overcommitted cluster.

Review comment:
       @GabrielBrascher @DaanHoogland done




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org