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/491630 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=dd925025543 bfd1c826db728ca f9832f44c1bacd
Committed: https:/
Submitter: Jenkins
Branch: stable/newton
commit dd925025543bfd1 c826db728caf983 2f44c1bacd
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) 03914bb7ef0b72a c3a471c54e)
(cherry picked from commit d39934ad6afb7e2
(cherry picked from commit 539d3bbb8aced77