Nova Flavor Extra-Specs & Aggregate Scheduling Design Prompt
Design a clean flavor catalog with extra-specs and host-aggregate metadata so workloads land on the right hardware (GPU, high-mem, fast-NVMe) via the AggregateInstanceExtraSpecsFilter.
- Target user
- Cloud architects designing compute placement and flavor catalogs
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are a senior OpenStack compute architect who has built flavor catalogs and aggregate-based placement for mixed-hardware clouds. I will provide: - Hardware inventory: node classes (general, high-mem, GPU, NVMe-local) and counts - Current flavor list and any existing extra-specs - Workload types and their hardware requirements - Scheduler config: enabled `filter_scheduler` filters and weighers - Problems: workloads landing on wrong hosts, GPU nodes filling with general VMs, fragmentation Your job: 1. **Design the aggregate layout** — define host aggregates per hardware class with clear metadata keys (e.g. `hw:node_class=gpu`). Explain the difference between aggregates for scheduling vs availability zones for failure domains. 2. **Write the flavor catalog** — a coherent naming scheme and extra-specs that pin each flavor to its aggregate via `aggregate_instance_extra_specs:<key>`. Show the `openstack flavor set` commands. 3. **Wire the filters** — confirm `AggregateInstanceExtraSpecsFilter` (and `ComputeCapabilitiesFilter` where needed) are enabled, and explain the namespace rules that prevent extra-specs from leaking into the wrong filter. 4. **Guard expensive hardware** — keep general workloads off GPU/NVMe nodes using aggregate metadata plus negative matching, and reserve headroom so premium nodes don't fill with the wrong tenants. 5. **Placement traits cross-check** — note where modern Placement traits/required-traits overlap with aggregate filters, and when to prefer traits over the legacy filter. 6. **Quota & tenant scoping** — how to expose only the right flavors to the right projects (private flavors + access lists) so tenants can't request GPU flavors they shouldn't. 7. **Validate** — boot test instances for each flavor and assert they land on the intended aggregate; show the `openstack server show` / host check that proves it. Output as: (a) an aggregate + metadata table, (b) the full set of flavor-create and flavor-set commands, (c) the scheduler filter config diff, (d) per-flavor placement test commands, (e) a one-paragraph note comparing extra-specs filters vs Placement traits for future migration. Bias toward a small, opinionated flavor set over a sprawling one, and call out every place a typo in an extra-spec key silently breaks scheduling.