Pearl1594 commented on a change in pull request #5142:
URL: https://github.com/apache/cloudstack/pull/5142#discussion_r660413826
##########
File path: server/src/main/java/com/cloud/hypervisor/HypervisorGuruBase.java
##########
@@ -179,9 +179,13 @@ protected VirtualMachineTO
toVirtualMachineTO(VirtualMachineProfile vmProfile) {
ServiceOffering offering =
_serviceOfferingDao.findById(vmProfile.getId(),
vmProfile.getServiceOfferingId());
VirtualMachine vm = vmProfile.getVirtualMachine();
HostVO host = hostDao.findById(vm.getHostId());
+ boolean divideMemoryByOverprovisioning = true;
+ boolean divideCpuByOverprovisioning = true;
- boolean divideMemoryByOverprovisioning =
VmMinMemoryEqualsMemoryDividedByMemOverprovisioningFactor.valueIn(host.getClusterId());
- boolean divideCpuByOverprovisioning =
VmMinCpuSpeedEqualsCpuSpeedDividedByCpuOverprovisioningFactor.valueIn(host.getClusterId());
+ if (host != null) {
Review comment:
@rhtyd As @DaanHoogland mentioned, the check for validating if the
passed argument is null is done by valueIn() (In ConfigKey class) hence there's
no need for a check at this point.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]