apache / apache/cloudstack

Add CPU Architecture attribute to Compute Offerings to prevent architecture mismatch with Templates/ISOs

未关闭
#13,593 3 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
long-term-plan multi-arch
主要语言
Java
星标
3.1k
派生
1.4k
平均合并
6 天 19 小时
30 天内合并 PR
32

描述

### The required feature described as a wish

As an Admin/Operator running a multi-arch zone (x86_64 and aarch64 hosts separated via host tags), I would like Compute Offerings to support a CPU architecture attribute, so the offering list can be filtered to match the architecture of the selected Template/ISO during deployment.

## Problem

Architecture separation currently relies entirely on host tags applied to Compute Offerings. The Template/ISO architecture selector has no relationship to Compute Offering selection — picking an aarch64 template does not filter out x86_64-tagged offerings, or vice versa. Nothing in the UI or API prevents deploying an aarch64 template on an offering tagged for x86_64 hosts, or the reverse. This surfaces as a late-stage deployment failure rather than being caught at selection time.

Note: `registerTemplate` already accepts an `arch` parameter (`x86_64` / `aarch64`), but Compute Offerings have no equivalent, so there's no architecture metadata to match against at deploy time.

## Proposed solution

- Add an optional CPU architecture field to Compute Offering create/update, consistent with the existing `arch` values used elsewhere (`x86_64` / `aarch64`).
- If unset, offering behaves as it does today — always shown, no filtering.
- If set, offering should only be selectable/listed when the chosen Template/ISO architecture matches.
- Enforce at the API level (`deployVirtualMachine`), not just the UI wizard, so direct API/Terraform/CloudMonkey usage gets the same protection.
- `listComputeOfferings` should expose the field for external tooling.
- This complements host tags (which still control placement) — the new field controls offering visibility/selectability relative to template architecture.

贡献指南

打开贡献指南

调研方向

从 Compute Offering 的 create/update 和 listComputeOfferings API 开始,然后跟踪 deployVirtualMachine 和现有的 registerTemplate arch 参数。定义 x86_64 和 aarch64 值如何匹配,包括未设置的情况,并验证 API、UI、Terraform 和 CloudMonkey 路径是否强制执行或暴露相同的行为。

由索引模型根据 Issue 内容生成。

评估

技术栈
java
领域
api, cloud, infrastructure
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。