sureshanaparti commented on a change in pull request #4375:
URL: https://github.com/apache/cloudstack/pull/4375#discussion_r505339089
##########
File path: server/src/main/java/com/cloud/server/ManagementServerImpl.java
##########
@@ -1326,10 +1327,9 @@ private HypervisorType getHypervisorType(VMInstanceVO
vm, StoragePool srcVolumeP
if (s_logger.isDebugEnabled()) {
s_logger.debug("Searching for all hosts in cluster " + cluster
+ " for migrating VM " + vm);
}
- allHostsPair = searchForServers(startIndex, pageSize, null,
hostType, null, null, null, cluster, null, keyword, null, null, null, null);
- // Filter out the current host.
+ allHostsPair = searchForServers(startIndex, pageSize, null,
hostType, null, null, null, cluster, null, keyword, null, null, null,
+ null, srcHost.getId());
allHosts = allHostsPair.first();
- allHosts.remove(srcHost);
plan = new DataCenterDeployment(srcHost.getDataCenterId(),
srcHost.getPodId(), srcHost.getClusterId(), null, null, null);
}
Review comment:
@davidjumani can you check if `otherHosts` here is not required as there
is no change in the `allHosts` & its count, which you can return as it is (as a
List), instead of Pair (with count). You can use use the `allHosts` count
wherever applicable.
----------------------------------------------------------------
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:
[email protected]