DaanHoogland commented on code in PR #9619:
URL: https://github.com/apache/cloudstack/pull/9619#discussion_r1740729425


##########
server/src/main/java/com/cloud/resource/ResourceManagerImpl.java:
##########
@@ -2746,6 +2753,13 @@ public HostVO fillRoutingHostVO(final HostVO host, final 
StartupRoutingCommand s
             throw new IllegalArgumentException("Can't add host whose 
hypervisor type is: " + hyType + " into cluster: " + clusterVO.getId() +
                     " whose hypervisor type is: " + 
clusterVO.getHypervisorType());
         }
+        CPU.CPUArchitecture hostCpuArchitecture = 
CPU.CPUArchitecture.fromType(ssCmd.getCpuArchitecture());
+        if (hostCpuArchitecture != null && clusterVO.getArch() != null && 
hostCpuArchitecture != clusterVO.getArch()) {
+            String msg = String.format("Can't add a host whose architecture 
is: %s into cluster of architecture type: %s",
+                    hostCpuArchitecture.getType(), 
clusterVO.getArch().getType());
+            logger.error(msg);
+            throw new IllegalArgumentException(msg);
+        }

Review Comment:
   So what if all hosts/clusters for a certain arch are removed, will it fall 
back to single arch? (i.e. what is the use of the flag)



-- 
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]

Reply via email to