diff options
author | Lee Yarwood <lyarwood@redhat.com> | 2018-08-09 17:43:50 +0100 |
---|---|---|
committer | Lee Yarwood <lyarwood@redhat.com> | 2018-08-10 16:38:18 +0100 |
commit | 838ecb33830e58dabd5e7116a164b7ef792e6fdb (patch) | |
tree | fa2a6e4b5939868f36d2f88d2f9202bc3aced9bf /nova/virt | |
parent | ff200e12ef5d61023f94d0e0bab0a0b97a266a98 (diff) | |
download | nova-838ecb33830e58dabd5e7116a164b7ef792e6fdb.tar.gz |
block_device: Rollback volumes to in-use on DeviceDetachFailed
The call to os-roll_detaching was dropped when
I3800b466a50b1e5f5d1e8c8a963d9a6258af67ee started to catch and reraise
DeviceDetachFailed. This call is required to ensure a volume returns to
an in-use state when the instance is unable to detach.
Closes-Bug: #1786318
Change-Id: I6b3dc09acc6f360806ce0ef8c8a65addbf4a8c51
(cherry picked from commit 3a4b4b91b0bee514d47a67f6a5f9c4ab9ae7f7d8)
(cherry picked from commit a890c3403653ddea5f5639fc783b93f9e8e39265)
Diffstat (limited to 'nova/virt')
-rw-r--r-- | nova/virt/block_device.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/nova/virt/block_device.py b/nova/virt/block_device.py index 82c63f87a1..1f90ce89be 100644 --- a/nova/virt/block_device.py +++ b/nova/virt/block_device.py @@ -308,6 +308,7 @@ class DriverVolumeBlockDevice(DriverBlockDevice): with excutils.save_and_reraise_exception(): LOG.warning('Guest refused to detach volume %(vol)s', {'vol': volume_id}, instance=instance) + volume_api.roll_detaching(context, volume_id) except Exception: with excutils.save_and_reraise_exception(): LOG.exception('Failed to detach volume ' |