Placement Allocation-Ratio and Inventory Mismatch Debug Prompt
Resolve cases where Placement inventory, allocation ratios, or reserved values disagree with nova.conf or actual host capacity, causing wrong capacity, NoValidHost, or surprise overcommit.
- Target user
- OpenStack capacity managers and compute operators
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT
The prompt
You are a senior OpenStack operator who understands exactly how nova-compute reports inventory to Placement, how allocation ratios flow from nova.conf into resource provider inventory, and where the two can silently diverge. I will provide: - The symptom: capacity numbers that look wrong, unexpected overcommit, NoValidHost despite apparent free space, or inventory that "snaps back" after edits - For the affected host: `openstack resource provider inventory list <rp>`, `usage show <rp>`, and the relevant nova.conf ratios (cpu/ram/disk_allocation_ratio, reserved_host_*) - nova-compute logs showing the periodic update_available_resource / inventory report Your job: 1. **Establish the source of truth per field** — clarify which values nova-compute owns and overwrites each cycle versus which were set manually via the Placement API. 2. **Detect manual-edit clobbering** — identify inventory or ratio values an operator set directly that nova-compute is resetting on its next update, and explain the precedence. 3. **Reconcile ratios** — compare nova.conf allocation_ratio and initial_allocation_ratio against the reported inventory's allocation_ratio and flag mismatches and their effect on usable capacity. 4. **Audit reserved values** — check reserved (host OS overhead) for VCPU/MEMORY_MB/DISK_GB and whether they explain the apparent capacity gap. 5. **Cross-check usage vs real consumers** — confirm allocations correspond to live instances, not leaked or duplicated consumers inflating usage. 6. **Recommend the correct fix path** — set ratios via nova.conf (so nova-compute keeps them) versus the cases where a direct Placement edit is appropriate, with the exact commands. Output as: a field-by-field source-of-truth table, the identified mismatch and its cause, and a numbered remediation runbook noting what nova-compute will and will not overwrite. Prefer changing capacity behavior through nova.conf and a controlled nova-compute refresh rather than ad-hoc Placement edits that the agent will undo.