nova/nova/tests/functional
Matt Riedemann a817b78dc4 Block deleting compute services which are hosting instances
This change makes "DELETE /os-services/{service_id}" fail
with a 409 response when attempting to delete a nova-compute
service which is still hosting instances.

Deleting a compute service also results in deleting the
related compute_nodes table entry for that service host.
The compute node resource provider in placement is tied
to the compute node via the UUID, and if we allow deleting
the compute service and node then the resource provider for
that node is effectively orphaned in Placement, along with
the instances which have allocations against that resource
provider.

Furthermore, restarting the compute service will create a
new service and compute_nodes record, and the compute node
would have a new UUID and resource provider. This will
affect scheduling for that host since Placement will be
reporting it as having available capacity which in reality
is not accurate.

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. Since this API did not previously expect to return
a 409 response, the "expected_errors" decorator is updated
and again, should not require a microversion per the
guidelines:

https://docs.openstack.org/nova/latest/contributor/microversions.html#when-a-microversion-is-not-needed

Conflicts:
      nova/tests/functional/wsgi/test_services.py

NOTE(mriedem): This is due to the rc_fields move from
change Iea182341f9419cb514a044f76864d6bec60a3683 in Rocky.

Change-Id: I0bd63b655ad3d3d39af8d15c781ce0a45efc8e3a
Closes-Bug: #1763183
(cherry picked from commit 42f62f1ed2)
2018-04-20 14:55:56 -04:00
..
api [placement] Add sending global request ID in get 2018-03-26 06:24:09 +00:00
api_sample_tests Fix invalid UUIDs in remaining tests 2018-01-30 17:15:03 +00:00
compute Merge "[placement] Add sending global request ID in delete (2)" 2018-01-17 06:59:39 +00:00
db Merge "Fix invalid UUIDs in remaining tests" 2018-02-02 01:16:07 +00:00
libvirt Merge "Bump minimum required libvirt/qemu versions for Pike" 2017-02-24 02:50:33 +00:00
notification_sample_tests Fix a comment in a notification functional test 2018-01-27 11:36:22 +00:00
regressions Don't persist RequestSpec.retry 2018-04-12 11:27:49 -04:00
wsgi Block deleting compute services which are hosting instances 2018-04-20 14:55:56 -04:00
__init__.py move eventlet GREENDNS override to top level 2014-12-08 17:41:03 -05:00
api_paste_fixture.py Remove legacy v2 API functional tests 2016-05-04 18:17:23 +08:00
api_samples_test_base.py Add pagination and changes-since for instance-actions 2017-12-14 07:42:17 +00:00
integrated_helpers.py Add late server group policy check to rebuild 2018-02-06 13:54:12 +01:00
test_aggregates.py re-Allow adding computes with no ComputeNodes to aggregates 2017-05-25 10:56:29 -07:00
test_compute_mgr.py Pass RequestSpec to ConductorTaskAPI.build_instances 2017-12-20 13:58:29 -05:00
test_images.py Add create image functional negative tests 2016-12-26 14:15:14 +09:00
test_instance_actions.py make microversion a client level construct for tests 2016-02-24 11:02:05 -05:00
test_legacy_v2_compatible_wrapper.py Trivial-Fix: Fix typos 2016-06-13 06:41:08 +00:00
test_list_servers_ip_filter.py Trivial: Nix duplicate PlacementFixture() in test 2017-12-01 15:39:28 -06:00
test_login.py update api_samples code to use better variables 2015-12-14 11:23:26 +08:00
test_metadata.py Remove unused logging import 2017-02-17 15:17:51 +07:00
test_middleware.py Removes unnecessary utf-8 encoding 2016-12-20 10:27:01 +07:00
test_multiattach.py [api] Allow multi-attach in compute api 2018-01-22 10:45:13 -05:00
test_nova_manage.py Unmap compute nodes when deleting host mappings in delete cell operation 2018-03-16 10:37:49 +01:00
test_server_group.py Add late server group policy check to rebuild 2018-02-06 13:54:12 +01:00
test_servers.py Add functional test for deleting a compute service 2018-04-20 14:50:05 -04:00