Add CPU Architecture attribute to Compute Offerings to prevent architecture mismatch with Templates/ISOs
- Lingua principale
- Java
- Stelle
- 3.1k
- Fork
- 1.4k
- Merge medio
- 6g 19h
- PR unite (30g)
- 32
Descrizione
### 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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia con le API create/update e listComputeOfferings di Compute Offering, quindi segui deployVirtualMachine e il parametro arch esistente di registerTemplate. Definisci come corrispondono i valori x86_64 e aarch64, incluso il caso in cui il valore non sia impostato, e verifica che i percorsi API, UI, Terraform e CloudMonkey applichino o espongano lo stesso comportamento.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- api, cloud, infrastructure
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100