Add CPU Architecture attribute to Compute Offerings to prevent architecture mismatch with Templates/ISOs
- Ngôn ngữ chính
- Java
- Star
- 3.1k
- Fork
- 1.4k
- Merge trung bình
- 6 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 32
Mô tả
### 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.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với các API create/update và listComputeOfferings của Compute Offering, sau đó lần theo deployVirtualMachine và tham số arch hiện có của registerTemplate. Xác định các giá trị x86_64 và aarch64 tương ứng như thế nào, bao gồm cả trường hợp không được thiết lập, và xác minh rằng các đường đi qua API, UI, Terraform và CloudMonkey áp dụng hoặc hiển thị cùng một hành vi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- api, cloud, infrastructure
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100