vishesh92 commented on code in PR #13452:
URL: https://github.com/apache/cloudstack/pull/13452#discussion_r3442318877
##########
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:
@winterhazel I could be wrong but I don't think we have any caching for
Daos. There is some code for caching, but AFAIK it's not being used anywhere.
--
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]