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

Reverse-spec · Services

nova — Async processing

Asynchronous processing — nova — branch stable/2026.2

Branch stable/2026.2 @ 8df1922926dd (34.0.0 + 7 commits) — repository https://opendev.org/openstack/nova — analysed on 2026-10-28

Related files: REST API · errors · interactions · scenarios.

Almost everything Nova does after a 202 happens here: RPC consumers in nova-conductor, nova-scheduler and nova-compute, periodic tasks that poll the cell database through the conductor, and hypervisor events. The inventory found 175 triggers (_inventory/inventory_stable-2026.2.json, triggers): 130 RPC server methods, 44 periodic tasks (19 in the compute manager, the rest in virt drivers, the image cache and the console proxy) and 1 notification subscription.

1. Summary

ProcessTriggerTypePurposeReadsWrites / emitsDefined at
nova-conductorobject_action, object_class_action_versionsRPC call (topic conductor)DB proxy for computescell DBcell DBnova/conductor/manager.py:147, nova/conductor/manager.py:172
nova-conductorschedule_and_build_instancesRPC cast (compute_task)boot: schedule, create in cell, start buildAPI DB, schedulercell DB, instance mappings, RPC build_and_run_instancenova/conductor/manager.py:1675
nova-conductorbuild_instancesRPC cast from computereschedule on an alternate hostrequest specPlacement claim, RPCnova/conductor/manager.py:671
nova-conductormigrate_server, live_migrate_instanceRPC call/castcold/live migration orchestrationscheduler, Placementmigrations, allocations, RPC prep_resize / live_migrationnova/conductor/manager.py:339, nova/conductor/manager.py:494
nova-conductorrebuild_instance, unshelve_instanceRPC castrebuild/evacuate, unshelveschedulerallocations, RPC to computenova/conductor/manager.py:1233, nova/conductor/manager.py:1033
nova-schedulerselect_destinationsRPC call (topic scheduler)choose hosts and claim resourcesPlacement, cell compute_nodesPlacement allocationsnova/scheduler/manager.py:188
nova-schedulerupdate_instance_info & co.RPC fanout castkeep host instance lists—in-memory host statenova/scheduler/manager.py:819
nova-scheduler_discover_hosts_in_cellsperiodic ([scheduler]/discover_hosts_in_cells_interval, off)map new compute hostscell compute_nodesAPI host_mappingsnova/scheduler/manager.py:111
nova-computebuild_and_run_instanceRPC cast (topic compute, server = host)create the guestPlacement, Glance, Neutron, Cinderguest, ports, attachments, instance statenova/compute/manager.py:2396
nova-compute70 other RPC methodsRPC call/castevery instance operation——§ 4.2
nova-computeupdate_available_resourceperiodic (every tick)report capacitydrivercompute_nodes, Placement provider treenova/compute/manager.py:11138
nova-compute_sync_power_statesperiodic (600 s)detect guests that changed state on their owndriver, instancespower_state, stop APInova/compute/manager.py:10778
nova-compute16 other periodic tasksperiodictimeouts, reclaim, cleanup, auditinstances, migrationssee § 4.3§ 4.3
nova-computelifecycle eventshypervisor eventreact to guest power changesdriverpower_statenova/compute/manager.py:1327
all servicesservice heartbeattimer ([DEFAULT]/report_interval, 10 s)liveness—services.report_count, updated_atnova/servicegroup/drivers/db.py
console proxiesWebSocket connectioneventvalidate console token and proxyconsole_auth_tokens—nova/console/websocketproxy.py

2. nova-conductor

nova-conductor (nova/cmd/conductor.py) runs two RPC endpoints on topic conductor (nova/conductor/rpcapi.py:30): ConductorManager (version 3.0, nova/conductor/manager.py:120) and ComputeTaskManager (namespace compute_task, version 1.26, nova/conductor/manager.py:269). It is the only service that talks to both the API database and the cell databases, and the only one that orchestrates scheduling. It has no periodic task.

2.1 Object proxy for nova-compute (object_class_action_versions, object_action, object_backport_versions)

  • Trigger: RPC call from nova-compute whenever it saves or loads a versioned object (Instance.save(), Migration.save(), BlockDeviceMapping.create()…), because computes run with indirection_api set and have no database credentials (nova/conductor/rpcapi.py:237-255).
  • Purpose: give compute hosts database access without exposing the database to them.
  • Flow: deserialise the object, call the named method on the conductor side against the cell database (nova/conductor/manager.py:133 _object_dispatch), return the updated object and the changed fields (nova/conductor/manager.py:172-190). object_backport_versions downgrades an object to the version a compute understands during rolling upgrades.
  • Concurrency: none beyond the DB layer; Instance.save(expected_task_state=…) implements compare-and-swap on task_state (UnexpectedTaskStateError).
  • Error behaviour: exceptions are serialised back to the compute (registered remote exceptions) and re-raised there.
  • Cost: the bulk of conductor traffic: several calls per instance operation per host, plus every periodic task of every compute.

2.2 schedule_and_build_instances

  • Trigger: RPC cast from nova-api after POST /servers (nova/compute/api.py:1836, nova/conductor/rpcapi.py:395).
  • Purpose: pick hosts, create the instance in its cell and start the build.
  • Flow (nova/conductor/manager.py:1675-1868):
    1. select_destinations RPC call to the scheduler with return_alternates=True (nova/conductor/manager.py:967); on NoValidHost/MaxRetriesExceeded the instances are buried in cell0: created in the cell0 database with vm_state=error, an instance fault and an instance action, instance mapping pointed at cell0, build request deleted, compute_task.build_instances error notification (nova/conductor/manager.py:1578-1673).
    2. For each selected host: resolve the host's cell through host_mappings (missing mapping → bury in cell0, log "No host-to-cell mapping found for selected host", nova/conductor/manager.py:1705-1718).
    3. Create the instances row (and its instance_extra, instance_system_metadata) in that cell (nova/conductor/manager.py:1758), then update instance_mappings.cell_id (nova/conductor/manager.py:1944 _map_instance_to_cell).
    4. Re-check quotas if [quota]/recheck_quota (nova/conductor/manager.py:1762-1777); on failure the instance is set to ERROR and cleaned up.
    5. Create BDMs and tags in the cell (nova/conductor/manager.py:1528, nova/conductor/manager.py:1545); create Cyborg ARQs if the flavor requests accelerators (nova/conductor/manager.py:1870).
    6. Delete the build_requests row (nova/conductor/manager.py:2027); if it is already gone, the user deleted the server meanwhile: the new instance is destroyed and allocations removed.
    7. RPC cast build_and_run_instance to the selected host with the alternates as host_list (nova/conductor/manager.py:1857).
  • Concurrency/idempotency: allocations are claimed by the scheduler, not the conductor; a replayed cast would hit InstanceExists / missing build request and clean up.
  • Error behaviour: any exception after scheduling triggers _cleanup_build_artifacts (nova/conductor/manager.py:1974): instances set to ERROR in their cell, build requests and mappings cleaned.

2.3 build_instances (reschedule path)

  • Trigger: RPC cast from nova-compute when a build fails with RescheduledException (nova/compute/manager.py:2573), carrying the remaining alternate hosts.
  • Flow (nova/conductor/manager.py:671): take the next alternate from host_list, claim its allocation request in Placement (claim_resources), and cast build_and_run_instance to it; no new scheduler call while alternates remain. When none is left: MaxRetriesExceeded → instance set to ERROR with a fault (nova/conductor/manager.py:644 _cleanup_when_reschedule_fails). The total number of attempts is [scheduler]/max_attempts (nova/conf/scheduler.py:25).

2.4 migrate_server (cold migration / resize) and live_migrate_instance

  • Trigger: resize/migrate actions (RPC call with [DEFAULT]/long_rpc_timeout when the API needs to know the scheduling result, nova/conductor/rpcapi.py:317-353); os-migrateLive (cast live_migrate_instance, nova/conductor/rpcapi.py:302).
  • Cold migration / resize (nova/conductor/manager.py:408, nova/conductor/tasks/migrate.py:232):
    1. create a migrations record and move the instance's allocations to the migration consumer in Placement (nova/conductor/tasks/migrate.py:29 replace_allocation_with_migration), so that the source usage is held by the migration and the destination will be held by the instance;
    2. select_destinations (or use the requested host), claim_resources on the chosen host (nova/conductor/tasks/migrate.py:342-372);
    3. RPC cast prep_resize to the destination compute (nova/conductor/tasks/migrate.py:329); a cross-cell resize (allowed by the policy compute:servers:resize:cross_cell, nova/policies/servers.py:23) goes through nova/conductor/tasks/cross_cell_migrate.py instead (snapshot-based, instance copied to the target cell);
    4. on NoValidHost the instance keeps its vm_state with task_state=None and a compute_task.migrate_server error notification (nova/conductor/manager.py:417-431); the API sees 400 only when the call was synchronous.
  • Live migration (nova/conductor/tasks/live_migrate.py:81):
    1. check the source is up (nova/conductor/tasks/live_migrate.py:301) and move allocations to the migration (nova/conductor/tasks/live_migrate.py:91);
    2. with a target host and force=False: check the host, claim allocations on it (nova/conductor/tasks/live_migrate.py:128); without a target: select_destinations in a loop over candidates (nova/conductor/tasks/live_migrate.py:533-575), each checked by _check_compatible_with_source_hypervisor (same hypervisor type, version not older) and by check_can_live_migrate_destination, an RPC call to the destination which itself calls check_can_live_migrate_source on the source (nova/conductor/tasks/live_migrate.py:373-378);
    3. RPC cast live_migration to the source compute (nova/conductor/tasks/live_migrate.py:154).
    4. Failures before step 3 set the migration to error/failed, revert allocations and leave the instance ACTIVE with task_state=None.

2.5 rebuild_instance (rebuild and evacuate), unshelve_instance

  • rebuild_instance (nova/conductor/manager.py:1233): for a plain rebuild with a new image, the scheduler is asked to validate the image against the current host (request_is_rebuild, no Placement query, nova/scheduler/manager.py:217); for an evacuate without a host, select_destinations picks a new host and its allocations are claimed (nova/conductor/manager.py:1190 _allocate_for_evacuate_dest_host); then cast rebuild_instance to the (new) host with recreate=True.
  • unshelve_instance (nova/conductor/manager.py:1033): a SHELVED instance is simply restarted on its host; a SHELVED_OFFLOADED one is rescheduled (select_destinations, honouring the requested AZ/host from 2.77/2.91), its allocations claimed, and unshelve_instance cast to the new host.

2.6 Other compute-task methods

MethodTriggerWhat it doesDefined at
cache_imagesPOST /os-aggregates/{id}/imagesRPC call cache_images (long timeout) to every up compute of the aggregate, at most [image_cache]/precache_concurrency in parallel (nova/thread_pool_factory.py:138); per-host progress is emitted as an aggregate cache_images versioned notification (nova/conductor/manager.py:2144-2146)nova/conductor/manager.py:2086
confirm_snapshot_based_resize / revert_snapshot_based_resizeconfirm/revert of a cross-cell resizeruns the cross-cell confirm/revert task: deletes the source-cell copy, or switches the instance mapping backnova/conductor/manager.py:2217, nova/conductor/manager.py:2236
attach_volume (1.26)POST /servers/{id}/os-volume_attachments on a non-offloaded server (RPC call, long timeout, nova/compute/api.py:5263)creates the volume BDM in the cell DB (nova/conductor/manager.py:2249), checks and reserves the volume in Cinder, then casts attach_volume to the host (nova/conductor/manager.py:2296-2301)nova/conductor/manager.py:2267

3. nova-scheduler

nova-scheduler (nova/cmd/scheduler.py) serves topic scheduler, version 4.5 (nova/scheduler/manager.py:65), with several workers per host ([scheduler]/workers, nova/conf/scheduler.py:86). It reads both databases (host states come from the cell compute_nodes tables) and Placement.

3.1 select_destinations

  • Trigger: RPC call from nova-conductor (nova/scheduler/rpcapi.py:132), timeout [DEFAULT]/long_rpc_timeout with a heartbeat every rpc_response_timeout.
  • Purpose: return, for each instance, the chosen host plus alternates, with resources already claimed in Placement.
  • Flow (nova/scheduler/manager.py:188-307):
    1. Request filters (nova/scheduler/request_filter.py:626 process_reqspec) translate the request into Placement constraints: tenant/AZ aggregates (require_tenant_aggregate, map_az_to_placement_aggregate), image type support trait, COMPUTE_STATUS_DISABLED forbidden trait, accelerators, routed networks, isolated aggregates, ephemeral encryption, virtio sound, TPM secret security, owner filter (nova/scheduler/request_filter.py:608 ALL_REQUEST_FILTERS). A failing request filter → NoValidHost.
    2. GET /allocation_candidates on Placement built from the flavor, image and port resource requests (nova/scheduler/manager.py:232-237); if CPU pinning is requested a second query with VCPU instead of PCPU is merged unless [workarounds]/disable_fallback_pcpu_query (nova/scheduler/manager.py:243-262). No candidates → log "Got no allocation candidates from the Placement API…" and NoValidHost (nova/scheduler/manager.py:276-283). The number of candidates is capped by [scheduler]/max_placement_results (default 1000, nova/conf/scheduler.py:63).
    3. Host states are built for the candidate providers only, from the cell compute_nodes tables and the in-memory instance tracking (nova/scheduler/manager.py:787).
    4. For each instance: run the enabled filters (default ComputeFilter, ComputeCapabilitiesFilter, ImagePropertiesFilter, ServerGroupAntiAffinityFilter, ServerGroupAffinityFilter, nova/conf/scheduler.py:323-336) and weighers (all by default, nova/conf/scheduler.py:355), pick randomly among the best [filter_scheduler]/host_subset_size hosts (nova/scheduler/manager.py:740-785), then claim the allocation request for that host in Placement (PUT /allocations/{instance_uuid}, nova/scheduler/manager.py:489); a failed claim (concurrent consumer) moves on to the next host.
    5. Not enough hosts for all instances → allocations already claimed in this request are deleted (_cleanup_allocations) and NoValidHost is raised (nova/scheduler/manager.py:542-572).
    6. Alternates: up to max_attempts - 1 further hosts per instance, filtered and weighed but not claimed (nova/scheduler/manager.py:649).
  • Concurrency: several schedulers run in parallel; correctness relies on Placement's consumer/provider generations, not on locks. Instance tracking in memory is eventually consistent.
  • Error behaviour: NoValidHost is an expected exception of the RPC endpoint (nova/scheduler/manager.py:187), so it is re-raised in the conductor as is.
  • Cost: 1–2 Placement GETs + one PUT per instance, plus host-state DB reads per cell.

3.2 Instance and aggregate tracking (fanout casts)

MethodEmitterEffectDefined at
update_aggregates, delete_aggregatenova-api aggregate changesrefresh the host manager's aggregate cachenova/scheduler/manager.py:800, nova/scheduler/manager.py:810
update_instance_info, delete_instance_info, sync_instance_infonova-compute when [filter_scheduler]/track_instance_changes (default true, nova/conf/scheduler.py:275)keep the per-host list of instances used by affinity filters without DB readsnova/scheduler/manager.py:819-839

All are fanout casts to every scheduler worker (nova/scheduler/rpcapi.py:162-186).

3.3 _discover_hosts_in_cells (periodic)

  • Trigger: oslo.service periodic task every [scheduler]/discover_hosts_in_cells_interval seconds (default -1 = disabled, nova/conf/scheduler.py:41), run at start (nova/scheduler/manager.py:108-110).
  • Purpose: map newly started compute hosts to their cell (host_mappings rows), instead of running nova-manage cell_v2 discover_hosts.
  • Concurrency: only the scheduler whose host name sorts first among the up schedulers runs it (nova/scheduler/manager.py:112-120); HostMappingExists is logged once as a warning when both mechanisms are used.
  • Data read: compute_nodes / services of every cell not yet mapped (nova/objects/host_mapping.py discover_hosts).

4. nova-compute

nova-compute (nova/cmd/compute.py) runs one per hypervisor host (or per Ironic conductor group). It consumes topics compute and compute-alt with server=<host> (03 § 1.1), owns the virt driver selected by [DEFAULT]/compute_driver, and has no database access: every object load/save goes through the conductor (§ 2.1). For OpenKeel the relevant contract is the driver interface (§ 4.5): KubeVirt replaces the libvirt driver, so libvirt internals are out of scope and only listed.

4.1 build_and_run_instance (boot on the host)

  • Trigger: RPC cast from the conductor (nova/conductor/manager.py:1857), handler nova/compute/manager.py:2396. The work runs in a background thread under a per-instance lock; the number of concurrent builds per host is bounded by [DEFAULT]/max_concurrent_builds (nova/conf/compute.py:657), a semaphore taken around _locked_do_build_and_run_instance (nova/compute/manager.py:2403-2408).
  • Purpose: create the guest on this host from the scheduled request.
  • Flow (nova/compute/manager.py:2644 _build_and_run_instance):
    1. read the instance's allocations from Placement (GET /allocations/{uuid}, nova/compute/manager.py:2682) and claim host resources in the local resource tracker (NUMA, PCI, ComputeResourcesUnavailable → reschedule) (nova/compute/manager.py:2688, nova/compute/resource_tracker.py:162);
    2. late server-group policy check: a hard (anti-)affinity violation raises GroupAffinityViolation → reschedule by policy (nova/compute/manager.py:2693);
    3. _build_resources (nova/compute/manager.py:2875): Cyborg accelerator requests; network allocation in Neutron started asynchronously (allocate_for_instance: create/update ports with binding:host_id, nova/compute/manager.py:1993-2015); task_state=block_device_mapping and volume attachment in Cinder (_prep_block_device, nova/compute/manager.py:2940-2944); image-backed root disk metadata;
    4. task_state=spawning, driver.spawn(...) (nova/compute/manager.py:2714): the driver fetches the image from Glance, creates disks, defines and starts the guest, and **waits for network-vif-plugged** events from Neutron for up to [DEFAULT]/vif_plugging_timeout (§ 02 § 4);
    5. on success vm_state=active, task_state=None, power_state from the driver, launched_at=now, instance.create.end notification, scheduler instance info update (nova/compute/manager.py:2858).
  • Error behaviour (nova/compute/manager.py:2722-2815): ComputeResourcesUnavailable and generic spawn failures → RescheduledException (allocations on this host deleted, networks cleaned, compute_task.build_instances cast to the conductor with the remaining alternates, nova/compute/manager.py:2536-2582); invalid image/flavor/network errors → BuildAbortException → ERROR without reschedule; instance deleted meanwhile → silent cleanup.
  • Cost: per boot, Placement 1 GET, Neutron ~2–4 calls per port, Cinder 2–3 calls per volume, Glance image download (cached per host by the image cache).

4.2 Other RPC endpoints

71 compute RPC methods are called by nova-api, nova-conductor or other computes. The table shows, for each: mode, the instance-action event recorded (compute_<method> via wrap_instance_event, nova/compute/utils.py:1457), the error decorators (wrap_instance_fault → instance_faults row, reverts_task_state → task_state=None on exception, errors_out_migration → migration error), and the virt driver / external calls found in the handler and its helpers up to two levels deep (calls made in threads or deeper helpers are not shown).

RPC method (handler)ModeInstance eventFault / revert / migration errorVirt driver callsCalls to other services
add_fixed_ip_to_instance (nova/compute/manager.py:6923)cast—faultinject_network_infonetwork_api.add_fixed_ip_to_instance
allow_share (nova/compute/manager.py:4708)castcompute_allow_sharefault——
attach_interface (nova/compute/manager.py:8566)callcompute_attach_interfacefaultattach_interface, network_binding_host_idnetwork_api.allocate_for_instance, network_api.create_resource_requests, network_api.deallocate_port_for_instance, reportclient.add_resources_to_instance_allocation, reportclient.get_allocation_candidates, reportclient.remove_resources_from_instance_allocation
attach_volume (nova/compute/manager.py:7845)castcompute_attach_volumefault—volume_api.attachment_delete, volume_api.unreserve_volume
backup_instance (nova/compute/manager.py:4553)castcompute_backup_instancefault, reverts task_statesnapshotimage_api.delete, image_api.get, image_api.get_all
build_and_run_instance (nova/compute/manager.py:2396)cast—fault, reverts task_stateget_available_nodes, spawn, unplug_vifscompute_task_api.build_instances, network_api.get_instance_nw_info, reportclient.delete_allocation_for_instance, reportclient.get_allocations_for_consumer, volume_api.delete
cache_images (nova/compute/manager.py:11722)call——cache_image—
check_can_live_migrate_destination (nova/compute/manager.py:8810)callcompute_check_can_live_migrate_destinationfaultcheck_can_live_migrate_destination, check_source_migrate_data_at_dest, cleanup_live_migration_destination_check, get_available_nodes, post_claim_migrate_datacompute_rpcapi.check_can_live_migrate_source, network_api.has_port_binding_extension, reportclient.get_allocations_for_consumer
check_can_live_migrate_source (nova/compute/manager.py:9036)callcompute_check_can_live_migrate_sourcefaultcheck_can_live_migrate_sourcecompute_rpcapi.supports_numa_live_migration
check_instance_shared_storage (nova/compute/manager.py:8785)call——check_instance_shared_storage_remote—
confirm_snapshot_based_resize_at_source (nova/compute/manager.py:5152)callcompute_confirm_snapshot_based_resize_at_sourcefault, migration→errorcleanupnetwork_api.cleanup_instance_network_on_host, network_api.get_instance_nw_info, reportclient.delete_allocation_for_instance, volume_api.attachment_delete
deny_share (nova/compute/manager.py:4715)castcompute_deny_sharefault——
detach_interface (nova/compute/manager.py:8707)castcompute_detach_interfacefaultdetach_interfacenetwork_api.deallocate_port_for_instance
detach_volume (nova/compute/manager.py:8001)castcompute_detach_volumefaultblock_stats—
drop_move_claim_at_destination (nova/compute/manager.py:10276)call—faultget_available_nodes—
external_instance_event (nova/compute/manager.py:11657)cast——detach_interface, extend_volume, power_update_eventnetwork_api.get_instance_nw_info, volume_api.get
finish_resize (nova/compute/manager.py:6646)castcompute_finish_resizefault, reverts task_state, migration→errorfinish_migrationnetwork_api.get_instance_nw_info, network_api.migrate_instance_finish, network_api.setup_networks_on_host, query_client.update_instance_info, reportclient.delete_allocation_for_instance, reportclient.get_allocs_for_consumer
finish_revert_resize (nova/compute/manager.py:5661)castcompute_finish_revert_resizefault, reverts task_state, migration→errorfinish_revert_migration, get_volume_connectornetwork_api.get_instance_nw_info, network_api.migrate_instance_finish, network_api.setup_networks_on_host, reportclient.get_allocations_for_consumer, reportclient.move_allocations, volume_api.attachment_complete …
finish_revert_snapshot_based_resize_at_source (nova/compute/manager.py:5452)callcompute_finish_revert_snapshot_based_resize_at_sourcefault, reverts task_state, migration→errorfinish_revert_migration, get_volume_connectornetwork_api.get_instance_nw_info, network_api.migrate_instance_finish, query_client.update_instance_info, reportclient.get_allocations_for_consumer, reportclient.move_allocations, volume_api.attachment_complete …
finish_snapshot_based_resize_at_dest (nova/compute/manager.py:6730)callcompute_finish_snapshot_based_resize_at_destfault, reverts task_state, migration→errorspawnnetwork_api.get_instance_nw_info, network_api.migrate_instance_finish, network_api.migrate_instance_start, query_client.update_instance_info, reportclient.get_allocations_for_consumer
get_console_output (nova/compute/manager.py:7550)call—faultget_console_output—
get_diagnostics (nova/compute/manager.py:7098)call—faultget_diagnostics, get_info—
get_host_uptime (nova/compute/manager.py:7091)call——get_host_uptime—
get_instance_diagnostics (nova/compute/manager.py:7114)call—faultget_info, get_instance_diagnostics—
get_mks_console (nova/compute/manager.py:7695)call—faultget_mks_console—
get_serial_console (nova/compute/manager.py:7741)call—faultget_serial_console—
get_spice_console (nova/compute/manager.py:7628)call—faultget_spice_console—
get_vnc_console (nova/compute/manager.py:7582)call—faultget_vnc_console—
host_maintenance_mode (nova/compute/manager.py:7015)call——host_maintenance_mode—
host_power_action (nova/compute/manager.py:7010)call——host_power_action—
inject_network_info (nova/compute/manager.py:7540)cast—faultinject_network_infonetwork_api.get_instance_nw_info
live_migration (nova/compute/manager.py:9469)castcompute_live_migrationfault, migration→error——
live_migration_abort (nova/compute/manager.py:9539)castcompute_live_migration_abortfaultlive_migration_abortnetwork_api.setup_networks_on_host, reportclient.get_allocations_for_consumer, reportclient.move_allocations
live_migration_force_complete (nova/compute/manager.py:9507)castcompute_live_migration_force_completefaultlive_migration_force_complete—
pause_instance (nova/compute/manager.py:6969)castcompute_pause_instancefault, reverts task_stateget_info, pause—
post_live_migration_at_destination (nova/compute/manager.py:9950)callcompute_post_live_migration_at_destinationfaultget_info, post_live_migration_at_destinationnetwork_api.get_instance_nw_info, network_api.migrate_instance_finish, network_api.setup_networks_on_host
pre_live_migration (nova/compute/manager.py:9066)callcompute_pre_live_migrationfaultget_volume_connector, pre_live_migrationnetwork_api.get_instance_nw_info, network_api.setup_networks_on_host, volume_api.attachment_complete, volume_api.attachment_create, volume_api.attachment_delete
prep_resize (nova/compute/manager.py:5955)castcompute_prep_resizefault, reverts task_stateget_available_nodescompute_rpcapi.resize_instance, compute_task_api.resize_instance, reportclient.get_allocations_for_consumer, reportclient.move_allocations
prep_snapshot_based_resize_at_dest (nova/compute/manager.py:6124)callcompute_prep_snapshot_based_resize_at_destfault—reportclient.get_allocs_for_consumer
prep_snapshot_based_resize_at_source (nova/compute/manager.py:6197)callcompute_prep_snapshot_based_resize_at_sourcefault, reverts task_state, migration→errordestroy, get_info, get_volume_connector, power_off, snapshotnetwork_api.get_instance_nw_info, network_api.migrate_instance_start, volume_api.attachment_create, volume_api.attachment_delete, volume_api.terminate_connection
quiesce_instance (nova/compute/manager.py:11861)call——quiesce—
reboot_instance (nova/compute/manager.py:4407)castcompute_reboot_instancefault, reverts task_stateget_info, rebootnetwork_api.get_instance_nw_info, volume_api.attachment_delete, volume_api.attachment_get, volume_api.attachment_get_all, volume_api.begin_detaching
rebuild_instance (nova/compute/manager.py:3894)castcompute_rebuild_instancefault, reverts task_stateinstance_on_disk, rebuildimage_api.generate_image_url, network_api.get_instance_nw_info, network_api.setup_instance_network_on_host, network_api.setup_networks_on_host, reportclient.get_allocations_for_consumer, volume_api.attachment_create
remove_fixed_ip_from_instance (nova/compute/manager.py:6945)cast—faultinject_network_infonetwork_api.remove_fixed_ip_from_instance
remove_volume_connection (nova/compute/manager.py:8301)call——get_volume_connectorvolume_api.attachment_delete, volume_api.terminate_connection
rescue_instance (nova/compute/manager.py:4864)castcompute_rescue_instancefault, reverts task_stateget_info, power_off, rescuenetwork_api.get_instance_nw_info
reserve_block_device_name (nova/compute/manager.py:7798)call—fault, reverts task_stateget_device_name_for_instance—
resize_instance (nova/compute/manager.py:6331)castcompute_resize_instancefault, reverts task_stateget_volume_connector, migrate_disk_and_power_offcompute_rpcapi.finish_resize, network_api.get_instance_nw_info, network_api.migrate_instance_start, reportclient.get_allocations_for_consumer, reportclient.move_allocations, volume_api.attachment_create …
restore_instance (nova/compute/manager.py:3658)castcompute_restore_instancefault, reverts task_stateget_info, power_on, restorenetwork_api.get_instance_nw_info
resume_instance (nova/compute/manager.py:7157)castcompute_resume_instancefault, reverts task_stateget_info, resumenetwork_api.get_instance_nw_info
revert_resize (nova/compute/manager.py:5610)castcompute_revert_resizefault, reverts task_state, migration→errorcheck_instance_shared_storage_cleanup, check_instance_shared_storage_local, destroy, get_volume_connectorcompute_rpcapi.check_instance_shared_storage, compute_rpcapi.finish_revert_resize, network_api.get_instance_nw_info, network_api.migrate_instance_start, network_api.setup_networks_on_host, volume_api.attachment_create …
revert_snapshot_based_resize_at_dest (nova/compute/manager.py:5339)callcompute_revert_snapshot_based_resize_at_destfault, reverts task_state, migration→errordestroynetwork_api.cleanup_instance_network_on_host, network_api.get_instance_nw_info, network_api.migrate_instance_start, query_client.delete_instance_info, volume_api.attachment_delete
rollback_live_migration_at_destination (nova/compute/manager.py:10290)castcompute_rollback_live_migration_at_destinationfaultrollback_live_migration_at_destinationnetwork_api.get_instance_nw_info, network_api.setup_networks_on_host
set_admin_password (nova/compute/manager.py:4771)callcompute_set_admin_passwordfault, reverts task_stateget_info, set_admin_password—
set_host_enabled (nova/compute/manager.py:7067)call——set_host_enabled—
shelve_instance (nova/compute/manager.py:7204)castcompute_shelve_instancefault, reverts task_statedestroy, get_info, power_off, snapshotnetwork_api.get_instance_nw_info, network_api.unbind_ports
shelve_offload_instance (nova/compute/manager.py:7289)castcompute_shelve_offload_instancefault, reverts task_statedestroy, get_info, get_volume_connector, power_offnetwork_api.get_instance_nw_info, network_api.unbind_ports, query_client.delete_instance_info, volume_api.attachment_create, volume_api.attachment_delete, volume_api.terminate_connection
snapshot_instance (nova/compute/manager.py:4569)castcompute_snapshot_instancefault, reverts task_stateget_info, snapshotimage_api.delete, image_api.get
soft_delete_instance (nova/compute/manager.py:3636)castcompute_soft_delete_instancefault, reverts task_stateget_info, power_off, soft_delete—
start_instance (nova/compute/manager.py:3581)castcompute_start_instancefault, reverts task_stateget_info, power_onimage_api.delete, network_api.get_instance_nw_info
suspend_instance (nova/compute/manager.py:7131)castcompute_suspend_instancefault, reverts task_stateget_info, suspend—
swap_volume (nova/compute/manager.py:8192)castcompute_swap_volumefaultget_volume_connector, swap_volumevolume_api.attachment_complete, volume_api.attachment_delete, volume_api.get, volume_api.migrate_volume_completion, volume_api.roll_detaching, volume_api.terminate_connection …
terminate_instance (nova/compute/manager.py:3446)castcompute_terminate_instancefault, reverts task_statedestroy, get_volume_connectornetwork_api.get_instance_nw_info, reportclient.delete_allocation_for_instance, volume_api.attachment_delete, volume_api.delete, volume_api.detach, volume_api.terminate_connection
trigger_crash_dump (nova/compute/manager.py:3613)castcompute_trigger_crash_dumpfaulttrigger_crash_dump—
unpause_instance (nova/compute/manager.py:6991)castcompute_unpause_instancefault, reverts task_stateget_info, unpause—
unquiesce_instance (nova/compute/manager.py:11885)cast——unquiescevolume_api.get_snapshot
unrescue_instance (nova/compute/manager.py:4929)castcompute_unrescue_instancefault, reverts task_stateget_info, unrescuenetwork_api.get_instance_nw_info
unshelve_instance (nova/compute/manager.py:7384)castcompute_unshelve_instancefault, reverts task_stateclean_networks_preparation, failed_spawn_cleanup, get_available_nodes, get_volume_connector, spawnimage_api.delete, network_api.get_instance_nw_info, network_api.setup_instance_network_on_host, query_client.update_instance_info, reportclient.delete_allocation_for_instance, reportclient.get_allocations_for_consumer …
validate_console_port (nova/compute/manager.py:7780)call—faultget_mks_console, get_serial_console, get_spice_console, get_vnc_console—
volume_snapshot_create (nova/compute/manager.py:4682)cast——volume_snapshot_create—
volume_snapshot_delete (nova/compute/manager.py:4694)cast——volume_snapshot_delete—

4.3 Periodic tasks (SQL polling through the conductor)

oslo.service periodic tasks of ComputeManager; tasks without spacing run on every tick (60 s by default), the first tick is delayed by a random [DEFAULT]/periodic_fuzzy_delay (≤ 60 s, nova/conf/service.py:66). All instance queries are InstanceList.get_by_filters(host=<this host>, …) executed by the conductor on the cell DB (often with use_slave=True).

TaskInterval (option, default)PurposeData readEffectsDefined at
update_available_resource[DEFAULT]/update_resources_interval, 0 → every tickresource tracker: report the host's capacity and usagedriver get_available_resource, update_provider_tree; instances and migrations on the hostcompute_nodes row updated; Placement provider tree, inventories, traits, aggregates synced (update_from_provider_tree, nova/compute/resource_tracker.py:1394); orphan compute nodes deleted with their providersnova/compute/manager.py:11138, nova/compute/resource_tracker.py:922
_sync_power_states[DEFAULT]/sync_power_state_interval, 600 s, run immediatelyalign DB power_state with the hypervisorinstances of the host + driver get_info per instance (pool of [DEFAULT]/sync_power_state_pool_size)power_state saved; an active instance found off is stopped through the API ("Instance shutdown by itself. Calling the stop API.")nova/compute/manager.py:10778, nova/compute/manager.py:10907
_check_instance_build_timeevery tick if [DEFAULT]/instance_build_timeout > 0 (default 0 = off)fail builds stuck in buildingvm_state=building, created_at older than timeoutinstance set to ERROR, log "Instance build timed out. Set to error state." (nova/compute/manager.py:1984-1985)nova/compute/manager.py:1968
_poll_rebooting_instancesevery tick if [DEFAULT]/reboot_timeout > 0 (0)unblock stuck rebootstask_state in rebooting states, updated_at older than timeoutdriver poll_rebooting_instancesnova/compute/manager.py:10514
_poll_rescued_instancesevery tick if [DEFAULT]/rescue_timeout > 0 (0)auto-unrescuevm_state=rescued older than timeoutAPI unrescuenova/compute/manager.py:10533
_poll_unconfirmed_resizesevery tick if [DEFAULT]/resize_confirm_window > 0 (0)auto-confirm resizesmigrations finished older than the window whose destination is this hostcompute_api.confirm_resize (nova/compute/manager.py:10629)nova/compute/manager.py:10551
_poll_shelved_instances[DEFAULT]/shelved_poll_interval, 3600 s; active if [DEFAULT]/shelved_offload_time > 0 (0)offload shelved instances after a delayvm_state=shelved, shelved_at system metadatashelve_offload_instance locally (host resources and allocations freed)nova/compute/manager.py:10635
_reclaim_queued_deletesevery tick if [DEFAULT]/reclaim_instance_interval > 0 (0)hard-delete soft-deleted instancesvm_state=soft-delete, deleted_at older than the interval_delete_instance (driver destroy, volumes, ports, allocations)nova/compute/manager.py:11043
_cleanup_running_deleted_instances[DEFAULT]/running_deleted_instance_poll_interval, 1800 s, run immediatelydetect guests still running for deleted instancesdriver list_instances vs deleted instancesaction [DEFAULT]/running_deleted_instance_action (reap = destroy, log, shutdown, noop)nova/compute/manager.py:11263
_run_pending_deletes[DEFAULT]/instance_delete_interval, 300 sretry file cleanup of deleted instancesinstances with cleaned=0 on the hostdriver delete_instance_filesnova/compute/manager.py:11760
_cleanup_incomplete_migrations[DEFAULT]/instance_delete_interval, 300 sremove leftover files of failed migrationsmigrations error/failed involving the hostdriver delete_instance_filesnova/compute/manager.py:11790
_cleanup_expired_console_auth_tokens[DEFAULT]/instance_delete_interval, 300 spurge expired console tokensconsole_auth_tokens.expiresrows deletednova/compute/manager.py:11902
_heal_instance_info_cache[DEFAULT]/heal_instance_info_cache_interval, -1 (disabled) in this releaserefresh network info caches from Neutron, one instance per runNeutron ports of one instanceinstance_info_caches updatednova/compute/manager.py:10407
_sync_scheduler_instance_info[DEFAULT]/scheduler_instance_sync_interval, 120 sresync the scheduler's view of this hostinstance UUIDs of the hostfanout cast sync_instance_infonova/compute/manager.py:2286
_instance_usage_auditevery tick if [DEFAULT]/instance_usage_audit (false)hourly usage notificationsinstances active during the last audit periodcompute.instance.exists notifications, task_log rownova/compute/manager.py:10673
_poll_volume_usage[DEFAULT]/volume_usage_poll_interval, 0 = offvolume I/O usagedriver get_all_volume_usagevolume_usage_cachenova/compute/manager.py:10759
_run_image_cache_manager_pass[image_cache]/manager_interval, 2400 sdelete unused base imagesinstances of all hosts sharing the cacheimage cache files removednova/compute/manager.py:11696
_reconcile_stale_share_access[DEFAULT]/stale_share_access_reconcile_interval, 1800 sreconcile Manila share access rulesshare mappings in errorManila access rules removednova/compute/manager.py:11845

Concurrency: periodic tasks run in the compute's own thread; each host only touches its own instances, so no cross-host lock is needed. Operations on one instance are serialised by utils.synchronized(instance.uuid) locks in the manager, and resource-tracker updates by the compute_resources semaphore (nova/compute/resource_tracker.py:58).

4.4 Driver events and the service heartbeat

  • Lifecycle events: the driver emits started/stopped/paused/resumed/suspended events (libvirt domain events); handle_lifecycle_event (nova/compute/manager.py:1327) runs _sync_instance_power_state for the instance, with a delay (in the libvirt host event loop, nova/virt/libvirt/host.py:314-317) to ignore transient stops during reboots.
  • Heartbeat: every [DEFAULT]/report_interval (10 s, nova/conf/service.py:25) each service updates services.report_count/updated_at through the conductor (nova/servicegroup/drivers/db.py). A service is down when its last report is older than [DEFAULT]/service_down_time (60 s, nova/conf/service.py:41). The API (check_instance_host(check_is_up=True), local delete, evacuate preconditions) and the scheduler's ComputeFilter rely on it.
  • Startup (init_host, nova/compute/manager.py:1557): the compute reconciles instances left in transient states (e.g. deleting → finish delete; rebooting → reboot; migrating → recover), destroys evacuated instances still on the host, and registers its compute node and Placement provider.

4.5 Virt driver interface (the contract a KubeVirt driver implements)

nova.virt.driver.ComputeDriver (nova/virt/driver.py) is the boundary between the compute manager and the hypervisor. A KubeVirt-backed compute (OpenKeel) replaces nova/virt/libvirt/ behind this interface. The table lists every public method of the interface, whether the base class raises NotImplementedError (mandatory for the operations a deployment wants), whether the compute manager calls it, and which in-tree drivers implement it. Capabilities (ComputeDriver.capabilities, 35 keys, e.g. supports_evacuate, supports_attach_interface, supports_device_tagging, supports_multiattach, supports_trusted_certs, supports_image_type_*, supports_vtpm, supports_socket_pci_numa_affinity…) are published as Placement traits on the compute node provider (COMPUTE_*, nova/virt/driver.py:219 CAPABILITY_TRAITS_MAP, nova/virt/driver.py:1339), so the scheduler only selects hosts whose driver supports what the request needs; the API also rejects some operations based on them.

Driver methodInterfaceRaises NotImplementedError by defaultCalled by compute managerlibvirtironicvmwareapizvmfake
init_hostnova/virt/driver.py:361yesyes✓✓✓✓✓
process_instances_at_startupnova/virt/driver.py:368noyes✓
cleanup_hostnova/virt/driver.py:381noyes✓✓
get_infonova/virt/driver.py:393yesyes✓✓✓✓✓
get_instance_driver_metadatanova/virt/driver.py:408nono
get_num_instancesnova/virt/driver.py:460noyes✓
instance_existsnova/virt/driver.py:475noyes✓✓✓✓
list_instancesnova/virt/driver.py:495yesyes✓✓✓✓✓
list_instance_uuidsnova/virt/driver.py:502yesyes✓✓✓✓
rebuildnova/virt/driver.py:508yesyes✓
prepare_for_spawnnova/virt/driver.py:555noyes✓✓
failed_spawn_cleanupnova/virt/driver.py:567noyes✓
spawnnova/virt/driver.py:583yesyes✓✓✓✓✓
destroynova/virt/driver.py:631yesyes✓✓✓✓✓
cleanupnova/virt/driver.py:649yesyes✓✓✓
rebootnova/virt/driver.py:669yesyes✓✓✓✓✓
get_console_outputnova/virt/driver.py:691yesyes✓✓✓✓
get_vnc_consolenova/virt/driver.py:699yesyes✓✓✓✓
get_spice_consolenova/virt/driver.py:709yesyes✓✓
get_serial_consolenova/virt/driver.py:719yesyes✓✓✓
get_mks_consolenova/virt/driver.py:729yesyes✓✓
get_diagnosticsnova/virt/driver.py:739yesyes✓✓✓
get_instance_diagnosticsnova/virt/driver.py:752yesyes✓✓✓
get_all_volume_usagenova/virt/driver.py:764yesyes✓✓
get_host_ip_addrnova/virt/driver.py:770yesno✓✓✓
attach_volumenova/virt/driver.py:776yesno✓✓✓
detach_volumenova/virt/driver.py:785yesyes✓✓✓
swap_volumenova/virt/driver.py:790yesyes✓✓
extend_volumenova/virt/driver.py:814yesyes✓✓
prepare_networks_before_block_device_mappingnova/virt/driver.py:830noyes✓
clean_networks_preparationnova/virt/driver.py:844noyes✓
attach_interfacenova/virt/driver.py:857yesyes✓✓✓✓
detach_interfacenova/virt/driver.py:876yesyes✓✓✓✓
migrate_disk_and_power_offnova/virt/driver.py:893yesyes✓✓✓
snapshotnova/virt/driver.py:920yesyes✓✓✓✓
finish_migrationnova/virt/driver.py:936yesyes✓✓✓
confirm_migrationnova/virt/driver.py:961yesyes✓✓✓
finish_revert_migrationnova/virt/driver.py:968yesyes✓✓✓
pausenova/virt/driver.py:984yesyes✓✓✓✓
unpausenova/virt/driver.py:1001yesyes✓✓✓✓
suspendnova/virt/driver.py:1017yesyes✓✓✓
resumenova/virt/driver.py:1034yesyes✓✓✓
resume_state_on_host_bootnova/virt/driver.py:1064yesyes✓✓✓
rescuenova/virt/driver.py:1077yesyes✓✓✓✓
unrescuenova/virt/driver.py:1097yesyes✓✓✓✓
power_offnova/virt/driver.py:1109yesyes✓✓✓✓✓
power_onnova/virt/driver.py:1119yesyes✓✓✓✓✓
mount_sharenova/virt/driver.py:1133yesno✓✓
umount_sharenova/virt/driver.py:1143yesno✓✓
is_share_mountednova/virt/driver.py:1154yesno✓✓
power_update_eventnova/virt/driver.py:1163yesyes✓✓
trigger_crash_dumpnova/virt/driver.py:1176yesyes✓✓✓
soft_deletenova/virt/driver.py:1189yesyes✓
restorenova/virt/driver.py:1203yesyes✓
update_provider_treenova/virt/driver.py:1257yesno✓✓✓✓✓
capabilities_as_traitsnova/virt/driver.py:1339nono
get_available_resourcenova/virt/driver.py:1360yesno✓✓✓✓✓
is_node_deletednova/virt/driver.py:1373noyes✓
pre_live_migrationnova/virt/driver.py:1393yesyes✓✓✓
live_migrationnova/virt/driver.py:1409yesyes✓✓✓
live_migration_force_completenova/virt/driver.py:1431yesyes✓✓
live_migration_abortnova/virt/driver.py:1439yesyes✓✓
rollback_live_migration_at_sourcenova/virt/driver.py:1447noyes✓
rollback_live_migration_at_destinationnova/virt/driver.py:1457yesyes✓✓✓
post_live_migrationnova/virt/driver.py:1475noyes✓✓
post_live_migration_at_sourcenova/virt/driver.py:1486yesyes✓✓
post_live_migration_at_destinationnova/virt/driver.py:1496yesyes✓✓✓
check_instance_shared_storage_localnova/virt/driver.py:1509yesyes✓
check_instance_shared_storage_remotenova/virt/driver.py:1520yesyes✓
check_instance_shared_storage_cleanupnova/virt/driver.py:1528noyes✓
check_can_live_migrate_destinationnova/virt/driver.py:1536yesyes✓✓✓
check_source_migrate_data_at_destnova/virt/driver.py:1555noyes✓
post_claim_migrate_datanova/virt/driver.py:1571noyes✓
cleanup_live_migration_destination_checknova/virt/driver.py:1587yesyes✓✓✓
check_can_live_migrate_sourcenova/virt/driver.py:1596yesyes✓✓✓
get_instance_disk_infonova/virt/driver.py:1611yesyes✓✓✓
set_admin_passwordnova/virt/driver.py:1632yesyes✓✓
inject_network_infonova/virt/driver.py:1640noyes✓✓
poll_rebooting_instancesnova/virt/driver.py:1645yesyes✓✓✓
host_power_actionnova/virt/driver.py:1663yesyes✓✓
host_maintenance_modenova/virt/driver.py:1676yesyes✓✓
set_host_enablednova/virt/driver.py:1695yesyes✓✓
get_host_uptimenova/virt/driver.py:1710yesyes✓✓✓
plug_vifsnova/virt/driver.py:1720yesyes✓✓✓
unplug_vifsnova/virt/driver.py:1736yesyes✓✓✓
get_host_cpu_statsnova/virt/driver.py:1750yesno✓✓
block_statsnova/virt/driver.py:1772yesyes✓✓
manage_image_cachenova/virt/driver.py:1797noyes✓✓
cache_imagenova/virt/driver.py:1809yesyes✓✓
get_volume_connectornova/virt/driver.py:1825yesyes✓✓✓✓
get_available_nodesnova/virt/driver.py:1841yesyes✓✓✓✓✓
get_nodenames_by_uuidnova/virt/driver.py:1851noyes✓✓✓
node_is_availablenova/virt/driver.py:1856nono✓
instance_on_disknova/virt/driver.py:1863noyes✓✓
register_event_listenernova/virt/driver.py:1877noyes
emit_eventnova/virt/driver.py:1888nono✓
delete_instance_filesnova/virt/driver.py:1911noyes✓
volume_snapshot_createnova/virt/driver.py:1919yesyes✓
volume_snapshot_deletenova/virt/driver.py:1941yesyes✓
default_root_device_namenova/virt/driver.py:1965yesyes✓
default_device_names_for_instancenova/virt/driver.py:1979yesyes✓
get_device_name_for_instancenova/virt/driver.py:1988yesyes✓
is_supported_fs_formatnova/virt/driver.py:2007nono✓
quiescenova/virt/driver.py:2019yesyes✓✓
unquiescenova/virt/driver.py:2033yesyes✓✓
network_binding_host_idnova/virt/driver.py:2047noyes✓
manages_network_binding_host_idnova/virt/driver.py:2057noyes✓
cleanup_lingering_instance_resourcesnova/virt/driver.py:2070noyes✓

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