winterhazel commented on code in PR #13452:
URL: https://github.com/apache/cloudstack/pull/13452#discussion_r3442361692
##########
server/src/main/java/com/cloud/server/ManagementServerImpl.java:
##########
@@ -1707,22 +1717,31 @@ public Ternary<Pair<List<? extends Host>, Integer>,
List<? extends Host>, Map<Ho
}
// Create deployment plan and VM profile
- final Host srcHost = _hostDao.findById(vm.getHostId());
- final DataCenterDeployment plan = new DataCenterDeployment(
- srcHost.getDataCenterId(), srcHost.getPodId(),
srcHost.getClusterId(), null, null, null);
+ final DataCenterDeployment plan =
createDeploymentPlanForMigrationListing(vm);
final VirtualMachineProfile vmProfile = new VirtualMachineProfileImpl(
vm, null, _offeringDao.findById(vm.getId(),
vm.getServiceOfferingId()), null, null);
// Apply affinity constraints
final ExcludeList excludes = applyAffinityConstraints(vm, vmProfile,
plan, vmList);
// Get hosts with capacity
- List<Host> suitableHosts = getCapableSuitableHosts(vm, vmProfile,
plan, filteredHosts, excludes, srcHost);
+ List<Host> suitableHosts = getCapableSuitableHosts(vm, vmProfile,
plan, filteredHosts, excludes);
Review Comment:
@vishesh92 well, I debugged a test environment and learned that the caching
code is, in fact, not used. I'll adjust this PR.
--
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]