yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #43182
[Bug 1489744] Re: Swapping volume will not result in correct status
Reviewed: https://review.openstack.org/252089
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=fc6e7250457479f221d9a11767a16511ffaf30eb
Submitter: Jenkins
Branch: master
commit fc6e7250457479f221d9a11767a16511ffaf30eb
Author: Ryan McNair <rdmcnair@xxxxxxxxxx>
Date: Wed Dec 9 15:29:27 2015 +0000
Fix non-migration swap with error
The fix I242c2c7c4a7197bbce04d0b3d75688f989ea1fd5 for non-migration
swap volume caused drivers which don't support volume swapping,
e.g. Ceph, to put the volumes in an incorrect state (additional
details can be found in bug #1489744 report). This patch adds an
additional check to ensure no errors occurred during the swap before
it completes the volume status updates, as well a test-case for
the non-migration swap scenario.
Change-Id: Ic2fddbcb12b4c9d251f9c3aab08a73e12d4d73e2
Closes-Bug: #1489744
** Changed in: cinder
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/1489744
Title:
Swapping volume will not result in correct status
Status in Cinder:
Fix Released
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/cinder/+bug/1489744/+subscriptions
References