← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1489744] [NEW] Swapping volume will not result in correct status

 

Public bug reported:

Swap volume API can swap a in-use volume with available volume.
Therefore in-use volume should be available and available will be in-use.
In face, volumes will stay in detaching and attaching respectively after send swap volume request to nova.
But those volumes had been swapped.
Following are commands flow.

> cinder list
+--------------------------------------+-----------+------+------+-------------+----------+-------------+--------------------------------------+
|                  ID                  |   Status  | Name | Size | Volume Type | Bootable | Multiattach |             Attached to              |
+--------------------------------------+-----------+------+------+-------------+----------+-------------+--------------------------------------+
| 8a3440f7-afbf-4581-95fb-14730fbd98c1 |   in-use  |  -   |  1   | lvmdriver-1 |  false   |    False    | 6d316dab-426e-48f9-956f-e2f0df1aabcd |
| cafc833a-8645-47db-b464-999142afa7be | available |  -   |  1   | lvmdriver-1 |  false   |    False    |                                      |
+--------------------------------------+-----------+------+------+-------------+----------+-------------+--------------------------------------+

> sudo iscsiadm -m node 
10.0.2.15:3260,-1 iqn.2010-10.org.openstack:volume-8a3440f7-afbf-4581-95fb-14730fbd98c1

* Ready to send swap volume request *
> curl -H "Content-Type: application/json" -H "X-Auth-Token: $TOKEN" 127.0.0.1:8774/v3/servers/6d316dab-426e-48f9-956f-e2f0df1aabcd/os-volume_attachments/8a3440f7-afbf-4581-95fb-14730fbd98c1 -X 'PUT' -d '{"volumeAttachment": {"volumeId":"cafc833a-8645-47db-b464-999142afa7be"}}'

> cinder list
+--------------------------------------+-----------+------+------+-------------+----------+-------------+--------------------------------------+
|                  ID                  |   Status  | Name | Size | Volume Type | Bootable | Multiattach |             Attached to              |
+--------------------------------------+-----------+------+------+-------------+----------+-------------+--------------------------------------+
| 8a3440f7-afbf-4581-95fb-14730fbd98c1 | detaching |  -   |  1   | lvmdriver-1 |  false   |    False    | 6d316dab-426e-48f9-956f-e2f0df1aabcd |
| cafc833a-8645-47db-b464-999142afa7be | attaching |  -   |  1   | lvmdriver-1 |  false   |    False    |                                      |
+--------------------------------------+-----------+------+------+-------------+----------+-------------+--------------------------------------+

> sudo iscsiadm -m node 
10.0.2.15:3260,-1 iqn.2010-10.org.openstack:volume-cafc833a-8645-47db-b464-999142afa7be

My devstack environments:
nova (12.0.0.0b3.dev508, /opt/stack/nova)
python-novaclient (2.26.0)
cinder (7.0.0.0b3.dev296, /opt/stack/cinder)
python-cinderclient (1.3.1)

** Affects: nova
     Importance: Undecided
     Assignee: Chung Chih, Hung (lyanchih)
         Status: New

** Changed in: nova
     Assignee: (unassigned) => Chung Chih, Hung (lyanchih)

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

Title:
  Swapping volume will not result in correct status

Status in OpenStack Compute (nova):
  New

Bug description:
  Swap volume API can swap a in-use volume with available volume.
  Therefore in-use volume should be available and available will be in-use.
  In face, volumes will stay in detaching and attaching respectively after send swap volume request to nova.
  But those volumes had been swapped.
  Following are commands flow.

  > cinder list
  +--------------------------------------+-----------+------+------+-------------+----------+-------------+--------------------------------------+
  |                  ID                  |   Status  | Name | Size | Volume Type | Bootable | Multiattach |             Attached to              |
  +--------------------------------------+-----------+------+------+-------------+----------+-------------+--------------------------------------+
  | 8a3440f7-afbf-4581-95fb-14730fbd98c1 |   in-use  |  -   |  1   | lvmdriver-1 |  false   |    False    | 6d316dab-426e-48f9-956f-e2f0df1aabcd |
  | cafc833a-8645-47db-b464-999142afa7be | available |  -   |  1   | lvmdriver-1 |  false   |    False    |                                      |
  +--------------------------------------+-----------+------+------+-------------+----------+-------------+--------------------------------------+

  > sudo iscsiadm -m node 
  10.0.2.15:3260,-1 iqn.2010-10.org.openstack:volume-8a3440f7-afbf-4581-95fb-14730fbd98c1

  * Ready to send swap volume request *
  > curl -H "Content-Type: application/json" -H "X-Auth-Token: $TOKEN" 127.0.0.1:8774/v3/servers/6d316dab-426e-48f9-956f-e2f0df1aabcd/os-volume_attachments/8a3440f7-afbf-4581-95fb-14730fbd98c1 -X 'PUT' -d '{"volumeAttachment": {"volumeId":"cafc833a-8645-47db-b464-999142afa7be"}}'

  > cinder list
  +--------------------------------------+-----------+------+------+-------------+----------+-------------+--------------------------------------+
  |                  ID                  |   Status  | Name | Size | Volume Type | Bootable | Multiattach |             Attached to              |
  +--------------------------------------+-----------+------+------+-------------+----------+-------------+--------------------------------------+
  | 8a3440f7-afbf-4581-95fb-14730fbd98c1 | detaching |  -   |  1   | lvmdriver-1 |  false   |    False    | 6d316dab-426e-48f9-956f-e2f0df1aabcd |
  | cafc833a-8645-47db-b464-999142afa7be | attaching |  -   |  1   | lvmdriver-1 |  false   |    False    |                                      |
  +--------------------------------------+-----------+------+------+-------------+----------+-------------+--------------------------------------+

  > sudo iscsiadm -m node 
  10.0.2.15:3260,-1 iqn.2010-10.org.openstack:volume-cafc833a-8645-47db-b464-999142afa7be

  My devstack environments:
  nova (12.0.0.0b3.dev508, /opt/stack/nova)
  python-novaclient (2.26.0)
  cinder (7.0.0.0b3.dev296, /opt/stack/cinder)
  python-cinderclient (1.3.1)

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


Follow ups