When a virtual machine is deleted / migrated / evacuated, sometimes its corresponding allocation on the source hypervisor host is not deleted from the PCD database.
Root Cause
If the compute service on the source hypervisor host is stopped abruptly while a VM is being deleted / migrated / evacuated, then the records for the VM in the PCD management database may not be deleted fully.
As a result, the host-side service cannot communicate with nova-conductor on the controller, so details are not shared and nova-compute may remain under the impression it still holds the virtual machine.
Resolution
Use the following steps to locate and remove orphaned allocations. Run the commands from a hypervisor host.
1
1. List stale allocations
Run nova-manage placement audit to list allocations for virtual machines that are either deleted or moved to other hypervisor hosts.
List stale allocations (run from a pod with nova-manage)