You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pe...@apache.org on 2025/02/11 13:25:56 UTC

(cloudstack) branch list-only-src-arch-hosts updated (367accacff2 -> e6cbf8a9823)

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

pearl11594 pushed a change to branch list-only-src-arch-hosts
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


 discard 367accacff2 List only those hosts matching source host arch in multi-arch zones
     new e6cbf8a9823 List only those hosts matching source host arch in multi-arch zones

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (367accacff2)
            \
             N -- N -- N   refs/heads/list-only-src-arch-hosts (e6cbf8a9823)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

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.


Summary of changes:
 server/src/main/java/com/cloud/server/ManagementServerImpl.java | 3 ---
 1 file changed, 3 deletions(-)


(cloudstack) 01/01: List only those hosts matching source host arch in multi-arch zones

Posted by pe...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pearl11594 pushed a commit to branch list-only-src-arch-hosts
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit e6cbf8a98239281a171bee19481c1f4184de357a
Author: Pearl Dsilva <pe...@gmail.com>
AuthorDate: Tue Feb 11 08:25:07 2025 -0500

    List only those hosts matching source host arch in multi-arch zones
---
 server/src/main/java/com/cloud/server/ManagementServerImpl.java | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/server/src/main/java/com/cloud/server/ManagementServerImpl.java b/server/src/main/java/com/cloud/server/ManagementServerImpl.java
index 9ffad8b8418..d391e55bce3 100644
--- a/server/src/main/java/com/cloud/server/ManagementServerImpl.java
+++ b/server/src/main/java/com/cloud/server/ManagementServerImpl.java
@@ -44,6 +44,8 @@ import javax.crypto.spec.SecretKeySpec;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
+import com.cloud.cpu.CPU;
+import com.cloud.utils.security.CertificateHelper;
 import org.apache.cloudstack.acl.ControlledEntity;
 import org.apache.cloudstack.acl.SecurityChecker;
 import org.apache.cloudstack.affinity.AffinityGroupProcessor;
@@ -1612,6 +1614,10 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
             logger.debug("Hosts having capacity and suitable for migration: {}", suitableHosts);
         }
 
+        // Only list hosts of the same architecture as the source Host
+        CPU.CPUArch hostArch = srcHost.getArch();
+        suitableHosts = suitableHosts.stream().filter(h -> h.getArch() == hostArch).collect(Collectors.toList());
+
         return new Ternary<>(otherHosts, suitableHosts, requiresStorageMotion);
     }