← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1988751] [NEW] Nova not detaching Cinder volume is volume is available

 

Public bug reported:

It is known that Cinder and Nova can sometime be out of sync, where one
of them thinks that a volume is attached and the other doesn't.

With the Cinder attachment API an operator can now fix the issue where
Nova says the volume is detached and Cinder says it's not.  The operator
just needs to run the "cinder attachment-delete" command on the specific
attachment.

The opposite situation, Cinder says it's available and Nova says it's
attached, cannot be currently fixed without modifying the Nova database
and making manual os-brick calls or the appropriate CLI calls to detach
the volume.

Ideally Nova should be able to call os-brick using the BDM information
to locally detach the volume (using the force option which can lose
data) and then not call cinder to do the detach since it already says
the volume is not mapped.

One way to reproduce this is:

- Create a VM
- Create a volume
- Attach the volume
- Delete the attachment in cinder with "cinder attachment-delete <attach_id>"
- Trying to detach the volume in nova

The error we'll see is something like:

ERROR (BadRequest): Invalid volume: Invalid input received: Invalid
volume: Unable to detach volume. Volume status must be 'in-use' and
attach_status must be 'attached' to detach. (HTTP 400) (Request-ID: req-
ec02147a-6b5b-40d2-991c-3d49207f5c9b) (HTTP 400) (Request-ID:
req-d8ab82c5-cb32-446e-a8e9-fd8e30be0995)

** Affects: nova
     Importance: Undecided
         Status: New

-- 
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/1988751

Title:
  Nova not detaching Cinder volume is volume is available

Status in OpenStack Compute (nova):
  New

Bug description:
  It is known that Cinder and Nova can sometime be out of sync, where
  one of them thinks that a volume is attached and the other doesn't.

  With the Cinder attachment API an operator can now fix the issue where
  Nova says the volume is detached and Cinder says it's not.  The
  operator just needs to run the "cinder attachment-delete" command on
  the specific attachment.

  The opposite situation, Cinder says it's available and Nova says it's
  attached, cannot be currently fixed without modifying the Nova
  database and making manual os-brick calls or the appropriate CLI calls
  to detach the volume.

  Ideally Nova should be able to call os-brick using the BDM information
  to locally detach the volume (using the force option which can lose
  data) and then not call cinder to do the detach since it already says
  the volume is not mapped.

  One way to reproduce this is:

  - Create a VM
  - Create a volume
  - Attach the volume
  - Delete the attachment in cinder with "cinder attachment-delete <attach_id>"
  - Trying to detach the volume in nova

  The error we'll see is something like:

  ERROR (BadRequest): Invalid volume: Invalid input received: Invalid
  volume: Unable to detach volume. Volume status must be 'in-use' and
  attach_status must be 'attached' to detach. (HTTP 400) (Request-ID:
  req-ec02147a-6b5b-40d2-991c-3d49207f5c9b) (HTTP 400) (Request-ID:
  req-d8ab82c5-cb32-446e-a8e9-fd8e30be0995)

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