Bug 1474837 - Raise DeviceNotFound detaching volume from persistent domain
Summary: Raise DeviceNotFound detaching volume from persistent domain
Keywords:
Status: CLOSED DUPLICATE of bug 1424656
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova
Version: 9.0 (Mitaka)
Hardware: x86_64
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Eoghan Glynn
QA Contact: Joe H. Rahme
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-25 13:29 UTC by Federico Iezzi
Modified: 2021-03-11 15:29 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-27 18:16:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1633236 0 None None None 2017-07-25 13:33:12 UTC
OpenStack gerrit 425114 0 None None None 2017-07-25 13:32:54 UTC

Description Federico Iezzi 2017-07-25 13:29:33 UTC
Description of problem:
Currently, a volume detach at the libvirt driver level happens in two
steps:

  1. Detach from persistent domain (affect instance upon next reboot)
  2. Detach from live domain (affect running instance)

A detach from a live domain is a request from the host to the guest,
which the guest can choose to ignore. For example, if the guest
has a file open on the volume by some process, it might ignore the
request to detach that volume because the file is in use.

If this scenario occurs, when a user tries a later request to detach
the volume, it will fail with this error when the attempt to detach
from the persistent domain is made:

  libvirtError: invalid argument: no target device <device>

because the volume was detached from the persistent domain the first
time. Because of this, the volume can only be detached by rebooting
the instance.

Version-Release number of selected component (if applicable):
RH-OSP9 with latest available updates

How reproducible:
 - Create a VM and attach a volume
 - Format the volume and mount it
 - Create any sort of I/O and at the same time try to detach the volume 
Of course, the 3rd point is not a best practice but unfortunately, if you create a Heat Stack with a VM and an attachment procedure, Heat will first detach the volume and then delete the VM. In this situation, the Stack delete operation might fail because the guest refuses to detach the volume.

Actual results:
Sometimes the volume detach fails and a then it is impossible to detach the volume unless a hard reboot is done.

Expected results:
It's fine the guest refuses to detach the Volume but Nova should allow the user to retry the detach operation.

Additional info:
https://bugzilla.redhat.com/show_bug.cgi?id=1474102
https://review.openstack.org/#/c/425114/

Comment 1 melanie witt 2017-07-27 18:16:15 UTC

*** This bug has been marked as a duplicate of bug 1424656 ***

Comment 2 awaugama 2017-09-07 19:01:32 UTC
Dup -- QE will decide about automating the original


Note You need to log in before you can comment on or make changes to this bug.