← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1662483] Re: detach_volume races with delete

 

Reviewed:  https://review.openstack.org/636701
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=2e4e203c1a4c4f91dd1aabae8c8d7b745df99be7
Submitter: Zuul
Branch:    master

commit 2e4e203c1a4c4f91dd1aabae8c8d7b745df99be7
Author: Gary Kotton <gkotton@xxxxxxxxxx>
Date:   Wed Feb 13 09:50:14 2019 -0800

    Lock detach_volume
    
    A detach_volume operation may take place during a attach_volume or
    delete_instance opertaion. This may lead to a race condition which
    would result in an instance going into an error state as the volume
    operation is not atomic.
    
    Commit 4c4dc3a6d added the lock around the attach_volume. This
    follows that same pattern.
    
    Co-Authored-By: Matthew Booth <mbooth@xxxxxxxxxx>
    
    Change-Id: I7261135a44f0c2eca4732c8360b9c74b729991a8
    Closes-bug: #1662483


** Changed in: nova
       Status: In Progress => Fix Released

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

Title:
  detach_volume races with delete

Status in OpenStack Compute (nova):
  Fix Released
Status in OpenStack Compute (nova) ocata series:
  Confirmed
Status in OpenStack Compute (nova) pike series:
  Confirmed
Status in OpenStack Compute (nova) queens series:
  Confirmed
Status in OpenStack Compute (nova) rocky series:
  Confirmed

Bug description:
  If a client does:

  nova volume-detach foo vol
  nova delete foo

  Assuming the volume-detach takes a moment, which it normally does, the
  delete will race with it also also attempt to detach the same volume.
  It's possible there are no side effects from this other than untidy
  log messages, but this is difficult to prove.

  I found this looking through CI logs.

  Note that volume-detach can also race with other instance operations,
  including itself. I'm almost certain that if you poke hard enough
  you'll find some combination that breaks things badly.

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


References