[SRU] Attempting to attach the same volume multiple times can cause bdm record for existing attachment to be deleted.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
git-harry | ||
nova (Ubuntu) |
Fix Released
|
High
|
Edward Hope-Morley | ||
Trusty |
Fix Released
|
High
|
Edward Hope-Morley |
Bug Description
[Impact]
* Ensure attching already attached volume to second instance does not
interfere with attached instance volume record.
[Test Case]
* Create cinder volume vol1 and two instances vm1 and vm2
* Attach vol1 to vm1 and check that attach was successful by doing:
- cinder list
- nova show <vm1>
e.g. http://
* Attach vol1 to vm2 and check that attach fails and, crucially, that the
first attach is unaffected (as above). You can also check the Nova db as
follows:
select * from block_device_
from which you would expect e.g. http://
shows that vol1 is attached to vm1 and vm2 attach failed.
* finally detach vol1 from vm1 and ensure that it succeeds.
[Regression Potential]
* none
---- ---- ---- ----
nova assumes there is only ever one bdm per volume. When an attach is initiated a new bdm is created, if the attach fails a bdm for the volume is deleted however it is not necessarily the one that was just created. The following steps show how a volume can get stuck detaching because of this.
$ nova list
c+-----
| ID | Name | Status | Task State | Power State | Networks |
+------
| cb5188f8-
+------
$ cinder list
+------
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+------
| c1e38e93-
+------
$ nova volume-attach test13 c1e38e93-
+------
| Property | Value |
+------
| device | /dev/vdb |
| id | c1e38e93-
| serverId | cb5188f8-
| volumeId | c1e38e93-
+------
$ cinder list
+------
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+------
| c1e38e93-
+------
$ nova volume-attach test13 c1e38e93-
ERROR (BadRequest): Invalid volume: status must be 'available' (HTTP 400) (Request-ID: req-1fa34b54-
$ nova volume-detach test13 c1e38e93-
$ cinder list
+------
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+------
| c1e38e93-
+------
2014-07-29 14:47:13.952 ERROR oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.
Related branches
- Ubuntu Server Developers: Pending requested
-
Diff: 392 lines (+372/-0)3 files modifieddebian/changelog (+8/-0)
debian/patches/fix-creating-bdm-for-failed-volume-attachment.patch (+363/-0)
debian/patches/series (+1/-0)
Changed in nova: | |
assignee: | nobody → git-harry (git-harry) |
Changed in nova: | |
importance: | Undecided → High |
milestone: | none → juno-3 |
tags: | added: icehouse-backport-potential |
Changed in nova: | |
assignee: | git-harry (git-harry) → Nikola Đipanov (ndipanov) |
Changed in nova: | |
assignee: | Nikola Đipanov (ndipanov) → git-harry (git-harry) |
Changed in nova: | |
milestone: | juno-3 → juno-rc1 |
Changed in nova: | |
assignee: | git-harry (git-harry) → Nikola Đipanov (ndipanov) |
Changed in nova: | |
assignee: | Nikola Đipanov (ndipanov) → git-harry (git-harry) |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | juno-rc1 → 2014.2 |
Changed in nova (Ubuntu): | |
status: | New → In Progress |
assignee: | nobody → Edward Hope-Morley (hopem) |
importance: | Undecided → High |
Changed in nova (Ubuntu Trusty): | |
assignee: | nobody → Edward Hope-Morley (hopem) |
importance: | Undecided → High |
status: | New → In Progress |
summary: |
- Attempting to attach the same volume multiple times can cause bdm record - for existing attachment to be deleted. + [SRU] Attempting to attach the same volume multiple times can cause bdm + record for existing attachment to be deleted. |
description: | updated |
Changed in nova (Ubuntu): | |
status: | In Progress → Fix Released |
description: | updated |
tags: | removed: icehouse-backport-potential |
Fix proposed to branch: master /review. openstack. org/110319
Review: https:/