apache / apache/cloudstack

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

Abierto
#13,593 3 comentarios 2 reacciones 0 asignados Ver en GitHub
long-term-plan multi-arch
Lenguaje dominante
Java
Estrellas
3.1k
Forks
1.4k
Merge medio
6 d 19 h
PR fusionados (30 d)
32

Descripción

### 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.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con las APIs create/update y listComputeOfferings de Compute Offering, y luego sigue deployVirtualMachine y el parámetro arch existente de registerTemplate. Define cómo coinciden los valores x86_64 y aarch64, incluido el caso en que no se establece ningún valor, y verifica que las rutas de API, UI, Terraform y CloudMonkey impongan o expongan el mismo comportamiento.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
java
Área
api, cloud, infrastructure
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
48/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.