OpenKeel: the sovereign French Cloud solution of the inherent group, with a European reach Discover inherent

Reverse-spec · Services

placement — Async processing

Processing triggered outside the API — placement — branch stable/2026.2

Branch stable/2026.2 @ f4a89d3803cb — repository https://opendev.org/openstack/placement — analysed on 2026-10-28

Finding: there is none while the service runs

The automated inventory found no trigger: 0 RPC server, 0 periodic task, 0 consumer, 0 event (_inventory/inventory_stable-2026.2.md). Reading the code confirms it:

FamilyPresent?Check
Bus consumers (RabbitMQ, Kafka…)nono import of oslo_messaging or of an AMQP client outside tests
SQL polling (periodic tasks)nono periodic_task, LoopingCall, thread or timer in placement/ outside tests
Cache pollingnothe caches (ResourceClassCache, ConsumerTypeCache) are per request (placement/context.py:26-27) and reload on demand (placement/attribute_cache.py), never on a timer
Events (OVSDB, callbacks, watchers)nono event registry

Functional consequence: Placement never changes the state it stores on its own. Its data only changes in four cases:

  • a REST request from a client;
  • the startup of an API process (sync of the standard traits and classes);
  • an administration command;
  • a db sync at startup, if [placement_database]/sync_on_startup = True.

Everything that looks like periodic processing is done by the clients. For example, the resource tracker of nova-compute sends the host's inventory on each cycle of its update_available_resource task, every 60 s by default [inferred: Nova behaviour, outside this repository].

So there is no "automatic cleanup":

  • an orphan allocation stays until someone deletes it;
  • a provider of a host that disappeared also stays, with its inventory, and remains a candidate as long as it has capacity.

For orphan allocations, the Nova-side tool is nova-manage placement audit --delete [inferred: a Nova tool].

Processing at API process startup

TriggerPurposeData read and writtenConcurrencyErrorDefined at
loadapp, when the WSGI module is loaded (once per process or worker)apply the schema if sync_on_startup = True (False by default)Alembic upgrade headseveral workers starting together run several upgrades [inferred]the application does not loadplacement/deploy.py:122-127
samecopy the standard traits from os-traits into the databaseSELECT name FROM traits, then INSERT of the missing onesprocess-local lock, plus DBDuplicateEntry ignored between processeslogged at DEBUGplacement/deploy.py:129; placement/objects/trait.py:125-147,265-299
samecopy the standard resource classes from os-resource-classesSELECT … FROM resource_classes, then INSERT of the missing onessamesameplacement/deploy.py:130; placement/objects/resource_class.py:209-255
sameload the policiespolicy.yaml or defaults——placement/deploy.py:140-150; placement/policy.py

These copies only add: a trait or class removed from os-traits or os-resource-classes is not deleted from the database. An upgrade of those libraries is only taken into account when the API processes restart. On this branch the minimum os-traits version is 3.9.0 (requirements.txt:23, see change history, change 11).

On this branch, startup no longer silences oslo.policy's "failed scope check" warnings when enforce_scope is disabled: that filter was removed with the option itself (see 06, change 5).

Administration processing (CLI, run by the operator)

CommandPurposeEffect on the databaseDefined at
placement-manage db synccreate or upgrade the schemaAlembic DDLplacement/cmd/manage.py:57-60
placement-manage db version / db stampshow or force the revisionalembic_version tableplacement/cmd/manage.py:62-68
placement-manage db online_data_migrations [--max-count N]data migrations in batches of 50 until done. Exit code 0 when everything is done, 1 when some remain, 2 on error, 127 on an invalid argumentset_root_provider_ids fills root_provider_id for old providers (placement/objects/resource_provider.py:494-524); create_incomplete_consumers creates the missing consumers rows for old allocations, with the placeholder project and user (placement/objects/consumer.py:26-64)placement/cmd/manage.py:31-34,70-163
placement-status upgrade checkpre-upgrade checks: missing root_provider_id, incomplete consumers, obsolete policy.json fileread onlyplacement/cmd/status.py:33-109

Source: reverse-spec-placement/05-async-processing_stable-2026.2.md. The _rewrite/ and _inventory/ files are not published on the site.