DaanHoogland commented on code in PR #9619:
URL: https://github.com/apache/cloudstack/pull/9619#discussion_r1740947929
##########
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:
again, why is that not always available? I still don't see the need for the
flag. a zone has hosts and hosts can only be grouped with hosts of the same
arch in a cluster, but there is no reason to assume a zone is of only one arch
at any time, is there?
--
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]