Detach device from live domain even if not found on persistent
In a past attempt to fix a bug [1], we started raising DeviceNotFound
if a device wasn't found on the persistent domain. This was to address
a scenario where the guest ignored the detach from the live domain
because it was busy and we wanted to avoid failing a later detach
request to the user (compute handles DeviceNotFound).
Unfortunately, in the above case, a later detach request won't fail to
the user but it also won't detach from the live domain. It sees the
device already detached from the persistent domain and doesn't attempt
to detach from the live domain.
This is a serious problem because it's possible for a volume to be
attached to two live domains and data corruption can occur.
This adds an attempt to detach from the live domain even if we had
already detached from the persistent domain in the past.
Reviewed: https:/ /review. openstack. org/491625 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=539d3bbb8ac ed7703914bb7ef0 b72ac3a471c54e
Committed: https:/
Submitter: Jenkins
Branch: stable/ocata
commit 539d3bbb8aced77 03914bb7ef0b72a c3a471c54e
Author: melanie witt <email address hidden>
Date: Fri Jul 28 17:06:53 2017 +0000
Detach device from live domain even if not found on persistent
In a past attempt to fix a bug [1], we started raising DeviceNotFound
if a device wasn't found on the persistent domain. This was to address
a scenario where the guest ignored the detach from the live domain
because it was busy and we wanted to avoid failing a later detach
request to the user (compute handles DeviceNotFound).
Unfortunately, in the above case, a later detach request won't fail to
the user but it also won't detach from the live domain. It sees the
device already detached from the persistent domain and doesn't attempt
to detach from the live domain.
This is a serious problem because it's possible for a volume to be
attached to two live domains and data corruption can occur.
This adds an attempt to detach from the live domain even if we had
already detached from the persistent domain in the past.
Closes-Bug: #1707238
[1] https:/ /review. openstack. org/386257
Change-Id: I8cd056fa17184a 98c31547add0e9f b2d363d0908 729bb45235f363a da86012d15)
(cherry picked from commit d39934ad6afb7e2