You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by vi...@apache.org on 2024/06/13 09:57:16 UTC

(cloudstack) branch drs-ensure-migration-within-cluster created (now f0cdc421971)

This is an automated email from the ASF dual-hosted git repository.

vishesh pushed a change to branch drs-ensure-migration-within-cluster
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


      at f0cdc421971 DRS: Ensure the destination host is part of the same cluster

This branch includes the following new commits:

     new f0cdc421971 DRS: Ensure the destination host is part of the same cluster

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(cloudstack) 01/01: DRS: Ensure the destination host is part of the same cluster

Posted by vi...@apache.org.
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 <vi...@gmail.com>
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,