Instance Unable to be Deleted, Stuck in Spawning/Build State

Problem

  • An instance is unable to be deleted and it's still showing in a spawning/build state.

  • The following is observed in /var/log/pf9/ostackhost.log on the instance's hypervisor.

INFO nova.compute.manager [...] [instance: <UUID>] During hypervisor state sync the instance has a pending task (deleting), skipping

Environment

  • Platform9 Managed OpenStack - v3.10 and Higher

  • Nova

Cause

The instance has another actively-running task which cannot be interrupted. For example, if the image is still being downloaded to the hypervisor and a deletion is issued, the image will continue being downloaded, and the deletion task will not be processed until afterward, or until the service is restarted.

INFO nova.virt.libvirt.driver [...] Creating image
INFO nova.compute.manager [...] During hypervisor state sync the instance has a pending task (spawning), skipping...
INFO nova.compute.manager [...] During hypervisor state sync the instance has a pending task (deleting), skipping

Resolution

  1. Wait for the active task to complete.

  2. Alternatively, or subsequently, should the task never complete, restart the pf9-ostackhost service on the hypervisor.

Afterward, the following should be observed in /var/log/pf9/ostackhost.log confirming the deletion.

Last updated