nova/nova/api/openstack/compute
Matt Riedemann 650fe118d1 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
2019-06-13 14:58:20 -04:00
..
schemas Remove '/os-cells' REST APIs 2019-04-16 18:26:13 +01:00
views Add "links" in the response of "nova show" for a down-cell instance 2019-03-01 13:02:14 +00:00
__init__.py Use plain routes list for '/servers' endpoint instead of stevedore 2017-04-25 22:38:33 +08:00
admin_actions.py Remove extensions module 2017-12-20 11:35:38 +08:00
admin_password.py Remove extensions module 2017-12-20 11:35:38 +08:00
agents.py Remove extensions module 2017-12-20 11:35:38 +08:00
aggregates.py Remove extensions module 2017-12-20 11:35:38 +08:00
assisted_volume_snapshots.py Remove extensions module 2017-12-20 11:35:38 +08:00
attach_interfaces.py Add microversion to expose virtual device tags 2019-02-21 13:38:51 +00:00
availability_zone.py Always pass HostAPI to get_availability_zones 2019-04-26 15:30:48 -04:00
baremetal_nodes.py Fix ironic client ironic_url deprecation warning 2018-10-24 17:59:10 +02:00
cells.py Remove '/os-cells' REST APIs 2019-04-16 18:26:13 +01:00
certificates.py Remove extensions module 2017-12-20 11:35:38 +08:00
cloudpipe.py Remove extensions module 2017-12-20 11:35:38 +08:00
console_auth_tokens.py Refactor scatter-gather utility to return exception objects 2018-10-31 15:18:07 -04:00
console_output.py Remove extensions module 2017-12-20 11:35:38 +08:00
consoles.py Remove extensions module 2017-12-20 11:35:38 +08:00
create_backup.py Remove extensions module 2017-12-20 11:35:38 +08:00
deferred_delete.py Remove extensions module 2017-12-20 11:35:38 +08:00
evacuate.py Follow up (#2) for the bw resource provider series 2019-02-11 14:35:15 -05:00
extension_info.py Remove unused LOG variables 2018-02-27 11:19:48 +00:00
fixed_ips.py Remove support for /os-fixed-ips REST API 2018-06-26 09:20:28 -04:00
flavor_access.py Remove extensions module 2017-12-20 11:35:38 +08:00
flavor_manage.py trivial: Remove dead 'ALIAS' constant 2019-04-03 11:27:35 +01:00
flavors.py trivial: Remove dead 'ALIAS' constant 2019-04-03 11:27:35 +01:00
flavors_extraspecs.py Remove extensions module 2017-12-20 11:35:38 +08:00
floating_ip_dns.py Remove support for /os-floating-ip-dns REST API 2018-07-18 22:23:45 -04:00
floating_ip_pools.py Remove extensions module 2017-12-20 11:35:38 +08:00
floating_ips.py Remove extensions module 2017-12-20 11:35:38 +08:00
floating_ips_bulk.py Remove support for /os-floating-ips-bulk REST API 2018-07-18 22:23:45 -04:00
fping.py Remove support for /os-fping REST API 2018-05-10 15:26:13 -04:00
helpers.py remove personality extension 2016-06-24 14:44:53 -04:00
hosts.py remove ec2 in service and cmd 2018-04-12 13:10:23 +08:00
hypervisors.py Stop handling cells v1 in '/os-hypervisors' API 2019-04-16 18:26:17 +01:00
image_metadata.py Remove extensions module 2017-12-20 11:35:38 +08:00
images.py Remove the caching the resource on Request object 2018-10-18 01:59:55 +00:00
instance_actions.py Fix an error when generating a host ID 2019-03-04 14:51:13 +09:00
instance_usage_audit_log.py remove unnecessary conf imports 2018-03-09 14:30:10 -05:00
ips.py Remove extensions module 2017-12-20 11:35:38 +08:00
keypairs.py Merge keypair extension response into server view builder 2018-08-23 09:04:00 -04:00
limits.py Merge used_limits extension response into limit view builder 2018-10-11 10:00:31 +00:00
lock_server.py Remove extensions module 2017-12-20 11:35:38 +08:00
migrate_server.py Follow up (#2) for the bw resource provider series 2019-02-11 14:35:15 -05:00
migrations.py Add restrictions on updated_at when getting migrations 2018-10-24 11:11:49 -04:00
multinic.py Remove extensions module 2017-12-20 11:35:38 +08:00
networks.py Remove extensions module 2017-12-20 11:35:38 +08:00
networks_associate.py Remove extensions module 2017-12-20 11:35:38 +08:00
pause_server.py Remove extensions module 2017-12-20 11:35:38 +08:00
quota_classes.py Remove extensions module 2017-12-20 11:35:38 +08:00
quota_sets.py quota: remove QuotaDriver.destroy_all_by_project() 2018-10-24 11:14:31 -04:00
remote_consoles.py Remove extensions module 2017-12-20 11:35:38 +08:00
rescue.py Remove extensions module 2017-12-20 11:35:38 +08:00
rest_api_version_history.rst Fix links to neutron QoS minimum bandwidth doc 2019-03-21 11:47:19 +01:00
routes.py Remove the extensions framework from wsgi.py 2018-10-18 02:01:03 +00:00
security_group_default_rules.py Remove extensions module 2017-12-20 11:35:38 +08:00
security_groups.py Merge security groups extension response into server view builder 2018-09-17 17:18:37 -04:00
server_diagnostics.py Drop API compat handling for old compute error cases 2018-05-16 17:24:14 -04:00
server_external_events.py Ensure the JSON-Schema covers the legacy v2 API 2018-02-01 16:56:07 -05:00
server_groups.py Microversion 2.64 - Use new format policy in server group 2018-07-13 10:43:42 +08:00
server_metadata.py Remove extensions module 2017-12-20 11:35:38 +08:00
server_migrations.py API: add support to abort queued live migration in microversion 2.65 2018-07-16 13:57:11 -04:00
server_password.py Remove extensions module 2017-12-20 11:35:38 +08:00
server_tags.py Remove extensions module 2017-12-20 11:35:38 +08:00
servers.py Remove MIN_COMPUTE_MULTIATTACH conditions in API 2019-04-26 16:00:33 -04:00
services.py Delete resource providers for all nodes when deleting compute service 2019-06-13 14:58:20 -04:00
shelve.py Follow up (#2) for the bw resource provider series 2019-02-11 14:35:15 -05:00
simple_tenant_usage.py Fix os-simple-tenant-usage result order 2018-10-26 14:47:52 +00:00
suspend_server.py Remove extensions module 2017-12-20 11:35:38 +08:00
tenant_networks.py Bump to hacking 1.1.0 2019-04-12 16:23:49 +01:00
versions.py Merge ResourceV21 obj into Resource obj 2017-12-21 19:33:35 +08:00
versionsV21.py Remove extensions module 2017-12-20 11:35:38 +08:00
virtual_interfaces.py Remove support for /os-virtual-interfaces REST API 2018-06-06 21:14:39 +00:00
volumes.py trivial: Remove dead 'ALIAS' constant 2019-04-03 11:27:35 +01:00
wsgi.py Add pbr-installed wsgi application for metadata api 2017-05-02 16:58:11 +00:00