nova/nova/api/openstack
Matt Riedemann 64d5278883 Delete resource providers for all nodes when deleting compute service
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
(cherry picked from commit 650fe118d1)
(cherry picked from commit e9889be94e)
2019-06-21 09:55:19 -04:00
..
compute Delete resource providers for all nodes when deleting compute service 2019-06-21 09:55:19 -04:00
placement Skip _exclude_nested_providers() if not nested 2019-05-16 01:04:31 +00:00
__init__.py Refactor WSGI apps and utils to limit imports 2018-03-06 22:05:12 +00:00
api_version_request.py API: add support to abort queued live migration in microversion 2.65 2018-07-16 13:57:11 -04:00
auth.py Noauth should also use request_id from compute_req_id.py 2018-04-04 14:21:01 -04:00
common.py conf: Remove deprecated 'allow_instance_snapshots' opt 2018-03-12 14:40:11 +00:00
identity.py Adapter raise_exc=False by default 2018-06-22 09:40:33 -05:00
requestlog.py Refactor WSGI apps and utils to limit imports 2018-03-06 22:05:12 +00:00
urlmap.py Use of six.PY3 should be forward compatible 2016-01-17 03:32:34 +00:00
versioned_method.py Implement microversion support on api methods 2014-12-05 09:54:41 +08:00
wsgi.py Refactor WSGI apps and utils to limit imports 2018-03-06 22:05:12 +00:00
wsgi_app.py Remove deprecated monkey_patch config options 2018-05-16 11:40:41 -04:00