← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1937375] [NEW] Duplicate BlockDeviceMapping if attaching volumes too fast

 

Public bug reported:

Description
===========
When attaching a volume to a running instance the nova-api validates that
the volume is not already attached to the instance. However nova-compute
is responsible for actually creating the BDM entry in the database.
If sending attach requests fast enough it can be possible that the same
"attach_volume" request can be sent to nova-compute for the same
volume/instance combination.

Steps to reproduce
==================
* Create an Instance and a volume
* run in 2 terminals in parallel "openstack server add volume <instance> <volume>"
* when being fast enough this results in "openstack server show" to report the volume id twice

Expected result
===============
The volume is attached to the instance just once

Actual result
=============
The volume is attached to the instance two (or with more parallelity) or more times.

Environment
===========
1. Happens on master till queens (possibly also earlier releases)

2. Which hypervisor did you use?
   Indepentent of Hypervisor, observed with Libvirt

2. Which storage type did you use?
   Independent of Storage, observed with ceph + nfs

3. Which networking type did you use?
   Independent of Network, observed with ovs

** Affects: nova
     Importance: Undecided
     Assignee: Felix Huettner (felix.huettner)
         Status: In Progress

** Changed in: nova
     Assignee: (unassigned) => Felix Huettner (felix.huettner)

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

Title:
  Duplicate BlockDeviceMapping if attaching volumes too fast

Status in OpenStack Compute (nova):
  In Progress

Bug description:
  Description
  ===========
  When attaching a volume to a running instance the nova-api validates that
  the volume is not already attached to the instance. However nova-compute
  is responsible for actually creating the BDM entry in the database.
  If sending attach requests fast enough it can be possible that the same
  "attach_volume" request can be sent to nova-compute for the same
  volume/instance combination.

  Steps to reproduce
  ==================
  * Create an Instance and a volume
  * run in 2 terminals in parallel "openstack server add volume <instance> <volume>"
  * when being fast enough this results in "openstack server show" to report the volume id twice

  Expected result
  ===============
  The volume is attached to the instance just once

  Actual result
  =============
  The volume is attached to the instance two (or with more parallelity) or more times.

  Environment
  ===========
  1. Happens on master till queens (possibly also earlier releases)

  2. Which hypervisor did you use?
     Indepentent of Hypervisor, observed with Libvirt

  2. Which storage type did you use?
     Independent of Storage, observed with ceph + nfs

  3. Which networking type did you use?
     Independent of Network, observed with ovs

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



Follow ups