This is an automated email from the ASF dual-hosted git repository. vishesh pushed a commit to branch drs-ensure-migration-within-cluster in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit f0cdc4219714de072e6d1ab8fd82cc064d8b77ea Author: Vishesh <[email protected]> AuthorDate: Thu Jun 13 15:27:01 2024 +0530 DRS: Ensure the destination host is part of the same cluster --- .../main/java/org/apache/cloudstack/cluster/ClusterDrsServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/java/org/apache/cloudstack/cluster/ClusterDrsServiceImpl.java b/server/src/main/java/org/apache/cloudstack/cluster/ClusterDrsServiceImpl.java index 9fe00fade61..8542b52eb50 100644 --- a/server/src/main/java/org/apache/cloudstack/cluster/ClusterDrsServiceImpl.java +++ b/server/src/main/java/org/apache/cloudstack/cluster/ClusterDrsServiceImpl.java @@ -467,7 +467,7 @@ public class ClusterDrsServiceImpl extends ManagerBase implements ClusterDrsServ Map<Host, Boolean> requiresStorageMotion = hostsForMigrationOfVM.third(); for (Host destHost : compatibleDestinationHosts) { - if (!suitableDestinationHosts.contains(destHost)) { + if (!suitableDestinationHosts.contains(destHost) || cluster.getId() != destHost.getClusterId()) { continue; } Ternary<Double, Double, Double> metrics = algorithm.getMetrics(cluster.getId(), vm,
