650fe118d1
Change I7b8622b178d5043ed1556d7bdceaf60f47e5ac80 started deleting the compute node resource provider associated with a compute node when deleting a nova-compute service. However, it would only delete the first compute node associated with the service which means for an ironic compute service that is managing multiple nodes, the resource providers were not cleaned up in placement. This fixes the issue by iterating all the compute nodes and cleaning up their providers. Note this could be potentially a lot of nodes, but we don't really have many good options here but to iterate them and clean them up one at a time. Note that this is best-effort but because of how the SchedulerReportClient.delete_resource_provider method ignores ResourceProviderInUse errors, and we could have stale allocations on the host for which delete_resource_provider is not accounting, namely allocations from evacuated instances (or incomplete migrations though you can't migrate baremetal instances today), we could still delete the compute service and orphan those in-use providers. That, however, is no worse than before this change where we did not try to cleanup all providers. The issue described above is being tracked with bug 1829479 and will be dealt with separately. Change-Id: I9e852e25ea89f32bf19cdaeb1f5dac8f749f5dbc Closes-Bug: #1811726
11 lines
420 B
YAML
11 lines
420 B
YAML
---
|
|
fixes:
|
|
- |
|
|
`Bug 1811726`_ is fixed by deleting the resource provider (in placement)
|
|
associated with each compute node record managed by a ``nova-compute``
|
|
service when that service is deleted via the
|
|
``DELETE /os-services/{service_id}`` API. This is particularly important
|
|
for compute services managing ironic baremetal nodes.
|
|
|
|
.. _Bug 1811726: https://bugs.launchpad.net/nova/+bug/1811726
|