Placement-backed scheduling in Nova: attributing latency after the Stein and Train transitions
0 reputation · 08 Nov 2020, 11:26 UTC
0 reputation · 08 Nov 2020, 11:26 UTC
Nova's scheduler has moved from host-side evaluation to Placement-backed candidate selection. Before Stein, the FilterScheduler applied filters and weighers to compute-node state it gathered itself. From Stein (19.0.0) onward, the scheduler requests allocation candidates from the Placement service, which returns a pre-filtered set, and Train (20.0.0) shifted allocation-ratio configuration toward Placement resource-provider inventories.
That transition leaves an unresolved attribution problem. A drop in scheduling throughput can now originate in nova-scheduler's own filtering and weighing, in the Placement API or its database, or in the request pattern itself. Overcommit behavior is also ambiguous during partial upgrades, because allocation ratios may exist both in legacy nova.conf options and in Placement inventories, and it is not always clear which one governs a given resource class. A "No valid host found" result can therefore reflect real capacity exhaustion or a Placement configuration mismatch.
For deployments that have completed this transition, which observable best separates scheduler-side latency from Placement-side latency? How should allocation ratios be reconciled when nova.conf and Placement inventories disagree? And what evidence distinguishes a genuine capacity shortfall from a Placement misconfiguration?
35275 reputation · 08 Nov 2020, 22:08 UTC
In a fully upgraded Nova (Stein or later) the two components expose distinct timing metrics that can be compared directly:
scheduler.filtering and scheduler.weighing (RPC‑level timings). These represent the time spent evaluating filters and weighers on the scheduler side.placement.api.request_time and placement.db.query_time (Prometheus labels). These capture the round‑trip to Placement and the database query cost.Collect a sample set of scheduling requests (e.g., via openstack server create or a workload generator) and record the two metric series. If the scheduler’s filtering/weighing times dominate, the bottleneck lies in Nova’s logic or its local state. If the Placement metrics are higher, the delay originates in the inventory service or its database. When both sides show similar latencies, the issue is likely shared or cascading.
After Train, the authoritative allocation ratio for a resource class is the one defined in Placement’s inventory. Nova falls back to the nova.conf value only when Placement is not queried for that class. The scheduler applies the stricter (i.e., higher reservation factor) of the two values. To resolve conflicts:
openstack placement inventory show <resource_class> to read the current ratio.[resource_class_allocation_ratio] in nova.conf.nova.conf if you intend to keep the legacy value).In practice, the scheduler will refuse a host if the inventory’s ratio permits fewer units than the request requires, even if nova.conf would allow more. Thus, the inventory is the source of truth for capacity calculations.
When a scheduling request fails with No valid host found, the following diagnostics help identify the root cause:
filtering failures in the scheduler logs, coupled with a non‑zero candidate count, indicates that filters (e.g., FilterScheduler constraints, custom filters) are rejecting hosts that Placement considered viable.Combining these observations with the metric comparison above provides a clear picture: if Placement reports capacity but the scheduler rejects hosts, the problem is with scheduler filters or a mis‑aligned allocation ratio. If Placement reports no candidates, the issue is a genuine capacity shortfall.
nova-scheduler and placement are on compatible versions (Stein ≥19.0.0, Train ≥20.0.0).No valid host found, first check the Placement candidate count, then review scheduler filter logs.These steps give operators a reproducible path to isolate latency, reconcile configuration drift, and differentiate real capacity limits from misconfiguration.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.