Nova Server Group & Anti-Affinity Scheduling Design Prompt
Design Nova server groups with affinity, anti-affinity, and soft policies so critical workloads spread across hosts, fault domains, and racks without breaking scheduling at scale.
- Target user
- OpenStack operators placing HA workloads across compute hosts
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT
The prompt
You are a senior OpenStack compute architect who has designed instance placement for HA clusters, databases, and control planes across thousands of compute hosts. I will provide: - Output of `openstack server group list` and `openstack server group show <id>` - Compute host inventory (hosts, availability zones, host aggregates, rack/PDU mapping) - Workload topology (which instances must co-locate vs spread) - Current Nova scheduler config (`enabled_filters`, `max_servers_per_host`) - Symptoms (NoValidHost on boot, instances landing on the same host, evacuation failures) Your job: 1. **Policy selection** — explain the four policies (`affinity`, `anti-affinity`, `soft-affinity`, `soft-anti-affinity`) and when each fits. Map my workloads to the right policy and justify each choice. 2. **Hard vs soft trade-offs** — show how hard `anti-affinity` causes NoValidHost when group size exceeds host count, and when soft variants degrade gracefully. Recommend a default for each workload tier. 3. **Filter pipeline** — confirm `ServerGroupAntiAffinityFilter` and `ServerGroupAffinityFilter` are in `enabled_filters`, ordered correctly, and explain the `max_servers_per_host` knob for relaxed anti-affinity. 4. **Fault domain mapping** — since server groups only reason about hosts, show how to combine them with host aggregates and AZs to spread across racks/PDUs. Provide the aggregate + flavor extra-specs design. 5. **Lifecycle gotchas** — group membership is set at boot only; cover resize, migration, and evacuation behavior, and how anti-affinity can block evacuation during host maintenance. 6. **Scale limits** — discuss group size ceilings, scheduler races under concurrent boots, and how `max_attempts` / retries interact. 7. **Validation plan** — commands to verify actual placement (`openstack server show -c hypervisor_hostname`) and a script to assert no two group members share a host. Output as: (a) per-tier policy recommendation table, (b) nova.conf scheduler diff, (c) aggregate + extra-specs YAML, (d) boot commands with `--hint group=<id>`, (e) placement-verification script, (f) maintenance/evacuation runbook notes. Bias toward: graceful degradation over rigid placement, explicit fault-domain reasoning, and never silently co-locating HA peers.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
Nova Placement & Resource Provider Debug Prompt
Diagnose why the Placement service reports the wrong capacity — phantom allocations, stale resource providers, inventory/allocation-ratio mismatches, and 'No valid host' failures rooted in Placement rather than the Nova scheduler filters.
-
Nova Conductor & RPC Worker Scaling Tuning Prompt
Right-size nova-conductor, scheduler, and API workers plus oslo.messaging RPC pools so the control plane stops timing out under fleet growth — without over-provisioning RabbitMQ connections or starving the database pool.
-
Nova CPU Model & Live-Migration Compatibility Design Prompt
Design a Nova cpu_mode/cpu_models strategy across a mixed-generation compute fleet so live migration works between hosts, guests get the CPU features they need, and you avoid the trap of host-passthrough locking VMs to a single host generation.
-
Nova-compute Host Health Recovery Prompt
Triage an unhealthy nova-compute host reporting as down in the service list — distinguishing a dead nova-compute service, a hung libvirt/qemu, an AMQP heartbeat problem, or a wedged hypervisor — and recover it without endangering running instances.
More OpenStack prompts & error guides
Browse every OpenStack prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.