orphan allocations cause orphan resource providers and prevents compute service deletion
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Description
===========
It can happen, that there are orphan allocations against a resource provider.
E.g. when something went wrong during a migration.
During the deletion of a nova-compute-
When the resource provider has still allocations against it, the deletion of the resource-provider will fail but the deletion of the nova-compute-
This causes orphan resource-providers.
This is based on the try-catch around the deletion of the resource-provider:
https:/
If a new nova-compute-
This causes a mismatch between the ID of the nova-compute-
If you now try to delete the new nova-compute-
This also happens for all other requests to placement, where the resource_provider is referenced via the UUID instead of the name.
Steps to reproduce
==================
1. Generate orphaned allocations on a resource provider
Can be done by generating a random allocation:
```
openstack resource provider allocation set <random-uuid> --allocation=
```
2. Delete the nova-compute-
3. Restart the nova-compute service, so a new nova-compute-
4. You will start to see erros in the logs of placement/nova-api, regarding not finding the resource provider with the old UUID
5. Delete the nova-compute-
Expected result
===============
No erros in the logs regarding not finding a resource-provider based on its ID.
The deletion of the recreated nova-compute-
Actual result
=============
We see erros in the log regarding not finding the resource provider:
```
An error occurred while updating COMPUTE_
```
We are not able to delete the newly created nova-compute-
Environment
===========
We are running Openstack Zed, but based on the Code the issue should be still present on the master branch.
description: | updated |
This is a known issue that we recently fixed by ensuring that you can't change the hostname silently : https:/ /specs. openstack. org/openstack/ nova-specs/ specs/2023. 1/implemented/ stable- compute- uuid.html
That series won't be backported to Zed so I'd recommend you to upgrade to Antelope. In the meantime, you can do some janitory on the orphaned resources by using the 'nova-manage placement audit' command which will tell you which placement resources are zombies.