commit 0652e4ab3d506ea21f1bd80b6802c6df5e7b523e
Author: Matt Riedemann <email address hidden>
Date: Thu Feb 15 16:33:56 2018 -0500
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.
Reviewed: https:/ /review. openstack. org/545132 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=0652e4ab3d5 06ea21f1bd80b68 02c6df5e7b523e
Committed: https:/
Submitter: Zuul
Branch: master
commit 0652e4ab3d506ea 21f1bd80b6802c6 df5e7b523e
Author: Matt Riedemann <email address hidden>
Date: Thu Feb 15 16:33:56 2018 -0500
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: I1a576bdb16befa be06a9728d7adf0 08fc0667077
Partial-Bug: #1404867