diff --git a/doc/source/admin/troubleshooting/orphaned-allocations.rst b/doc/source/admin/troubleshooting/orphaned-allocations.rst index ca49aa4aab4c..c61684497b48 100644 --- a/doc/source/admin/troubleshooting/orphaned-allocations.rst +++ b/doc/source/admin/troubleshooting/orphaned-allocations.rst @@ -199,3 +199,38 @@ to get allocations for a consumer before deleting them, e.g.: $ openstack --os-placement-api-version 1.12 resource provider allocation show $vm1 .. _Migration-based allocations: https://specs.openstack.org/openstack/nova-specs/specs/queens/implemented/migration-allocations.html + +Using placement audit +~~~~~~~~~~~~~~~~~~~~~ + +If you have a situation where orphaned allocations exist for an instance that +was deleted in the past, example log message: + +.. code-block:: console + + Instance has allocations against this compute host but is not found in the database. + +you can use the :ref:`nova-manage placement audit ` tool +to have it find and optionally delete orphaned placement allocations. This tool +will call the placement API to modify allocations. + +To list all allocations that are unrelated to an existing instance or migration +UUID: + +.. code-block:: console + + $ nova-manage placement audit --verbose + +To delete all allocations on all resource providers that are unrelated to an +existing instance or migration UUID: + +.. code-block:: console + + $ nova-manage placement audit --verbose --delete + +To delete all allocations on a specific resource provider that are unrelated to +an existing instance or migration UUID: + +.. code-block:: console + + $ nova-manage placement audit --verbose --delete --resource-provider diff --git a/doc/source/cli/nova-manage.rst b/doc/source/cli/nova-manage.rst index 4dc614db2aa9..2a4320598775 100644 --- a/doc/source/cli/nova-manage.rst +++ b/doc/source/cli/nova-manage.rst @@ -1358,6 +1358,8 @@ Specify :option:`--verbose` to get detailed progress output during execution. * - 255 - An unexpected error occurred. +.. _placement_audit_cli: + placement audit ---------------