nova/nova/tests
Matt Riedemann c1b3d8c214 Detach volumes when deleting a BFV server pre-scheduling
If the user creates a volume-backed server from an existing
volume, the API reserves the volume by creating an attachment
against it. This puts the volume into 'attaching' status.

If the user then deletes the server before it's created in a
cell, by deleting the build request, the attached volume is
orphaned and requires admin intervention in the block storage
service.

This change simply pulls the BDMs off the BuildRequest when
we delete the server via the build request and does the same
local cleanup of those volumes as we would in a "normal" local
delete scenario that the instance was created in a cell but
doesn't have a host.

We don't have to worry about ports in this scenario since
ports are created on the compute, in a cell, and if we're
deleting a build request then we never got far enough to
create ports.

Change-Id: I1a576bdb16befabe06a9728d7adf008fc0667077
Partial-Bug: #1404867
(cherry picked from commit 0652e4ab3d)
2018-02-20 14:10:56 -05:00
..
functional Detach volumes when deleting a BFV server pre-scheduling 2018-02-20 14:10:56 -05:00
live_migration/hooks Fix live migration grenade ceph setup 2017-10-26 17:53:15 -04:00
unit Clean up ports and volumes when deleting ERROR instance 2018-02-20 14:10:26 -05:00
__init__.py
fixtures.py Add functional tests to ensure BDM removal on delete 2018-02-20 14:10:21 -05:00
json_ref.py Nits from Ic3ab7d60e4ac12b767fe70bef97b327545a86e74 2017-11-28 15:55:45 +01:00
uuidsentinel.py Remove redundant str typecasting 2016-09-23 12:53:34 +05:30