Public bug reported:

There is a problem where if a volume detach fails at the libvirt driver
level for some reason, the volume detach cannot be retried and the
volume cannot be detached until the instance is rebooted.

Currently, a volume detach at the libvirt driver level happens in two
steps:

 1. Detach from the persistent domain (this will affect the instance upon next 
reboot)
 2. Detach from the transient domain (this will affect the running instance)

A detach from a transient domain is a request from the host to the
guest, to detach the volume. The guest can choose to ignore this
request. 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 it is
busy.

If this scenario occurs, when a user tries a later request to detach the
volume, it will fail with the error:

 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.

The behavior should be changed to detach from the transient domain
first, retrying if necessary, and detach from the persistent domain only
if the detach from the transient domain has succeeded. This way, if the
guest volume is busy and it ignores the detach request, the detach can
be tried again at a later time by the user.

Suggested steps to reproduce:

 1. Boot an instance and attach a volume
 2. Log in to the guest and open a file on that volume in a text editor
 3. Try to detach the volume using 'nova volume-detach' (it should have failed)
 4. Exit the text editor on the guest
 5. Try to detach the volume using 'nova volume-detach' (should get the 'no 
target device' error)

** Affects: nova
     Importance: Undecided
     Assignee: melanie witt (melwitt)
         Status: In Progress


** Tags: libvirt

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1633236

Title:
  If volume detach fails, it cannot be retried and the instance must be
  rebooted to detach

Status in OpenStack Compute (nova):
  In Progress

Bug description:
  There is a problem where if a volume detach fails at the libvirt
  driver level for some reason, the volume detach cannot be retried and
  the volume cannot be detached until the instance is rebooted.

  Currently, a volume detach at the libvirt driver level happens in two
  steps:

   1. Detach from the persistent domain (this will affect the instance upon 
next reboot)
   2. Detach from the transient domain (this will affect the running instance)

  A detach from a transient domain is a request from the host to the
  guest, to detach the volume. The guest can choose to ignore this
  request. 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 it is busy.

  If this scenario occurs, when a user tries a later request to detach
  the volume, it will fail with the error:

   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.

  The behavior should be changed to detach from the transient domain
  first, retrying if necessary, and detach from the persistent domain
  only if the detach from the transient domain has succeeded. This way,
  if the guest volume is busy and it ignores the detach request, the
  detach can be tried again at a later time by the user.

  Suggested steps to reproduce:

   1. Boot an instance and attach a volume
   2. Log in to the guest and open a file on that volume in a text editor
   3. Try to detach the volume using 'nova volume-detach' (it should have 
failed)
   4. Exit the text editor on the guest
   5. Try to detach the volume using 'nova volume-detach' (should get the 'no 
target device' error)

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1633236/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to