nova/nova/api
Artom Lifshitz e238cc9cd6 Allow deletion of compute service with no compute nodes
Consider the following situation:

- Using the Ironic virt driver
- Replacing (so removing and re-adding) all baremetal nodes
  associated with a single nova-compute service

The update resources periodic will have destroyed the compute node
records because they're no longer being reported by the virt driver.
If we then attempt to manually delete the compute service record, the
datbase layer will raise an exception, as there are no longer any
compute node records for the host. Previously, this exception would
get bubbled up as an error 500 in the API. This patch catches it and
allows service deletion to complete succefully.

Closes bug: 1860312
Change-Id: I2f9ad3df25306e070c8c3538bfed1212d6d8682f
(cherry picked from commit 880611df0b)
(cherry picked from commit df5158bf3f)
2021-07-29 10:47:54 +02:00
..
metadata Use cell targeted context to query BDMs for metadata 2020-11-04 15:07:08 +00:00
openstack Allow deletion of compute service with no compute nodes 2021-07-29 10:47:54 +02:00
validation Merge "scheduler: Request vTPM trait based on flavor or image" 2020-07-24 09:23:54 +00:00
__init__.py
auth.py Stop using NoAuthMiddleware in tests 2019-10-14 11:43:52 -05:00
compute_req_id.py Migrate to oslo request_id middleware - mv 2.46 2017-05-27 10:11:44 +00:00
wsgi.py trivial: Remove remaining '_LE' instances 2020-05-18 16:52:20 +01:00