nova/nova/api
Matt Riedemann d88f353796 Block deleting compute services with in-progress migrations
This builds on I0bd63b655ad3d3d39af8d15c781ce0a45efc8e3a
which made DELETE /os-services/{service_id} fail with a 409
response if the host has instances on it. This change checks
for in-progress migrations involving the nodes on the host,
either as the source or destination nodes, and returns a 409
error response if any are found.

Failling to do this can lead to orphaned resource providers
in placement and also failing to properly confirm or revert
a pending resize or cold migration.

A release note is included for the (justified) behavior
change in the API. A new microversion should not be required
for this since admins should not have to opt out of broken
behavior.

Conflicts:
      nova/tests/functional/integrated_helpers.py

NOTE(mriedem): The conflict is due to not having change
Iea283322124cb35fc0bc6d25f35548621e8c8c2f in Queens so
_revert_resize is added to ProviderUsageBaseTestCase
within test_servers.py.

Change-Id: I70e06c607045a1c0842f13069e51fef438012a9c
Closes-Bug: #1852610
(cherry picked from commit 92fed02610)
(cherry picked from commit a9650b3cbf)
(cherry picked from commit a0290858b7)
(cherry picked from commit 30a6350685)
2020-02-12 16:21:13 +00:00
..
ec2 delete more i18n log markers 2017-03-21 07:37:21 -04:00
metadata Merge "conf: Remove 'vendordata_driver' opt" 2018-01-19 11:41:15 +00:00
openstack Block deleting compute services with in-progress migrations 2020-02-12 16:21:13 +00:00
validation Enable reset keypair while rebuilding instance 2017-11-13 10:49:02 +08:00
__init__.py Remove unused copyright from nova.api.__init__ 2014-01-10 16:24:50 +08:00
auth.py delete more i18n log markers 2017-03-21 07:37:21 -04:00
compute_req_id.py Migrate to oslo request_id middleware - mv 2.46 2017-05-27 10:11:44 +00:00
manager.py Only setup iptables for metadata if using nova-net 2017-07-20 00:00:22 +00:00