Created attachment 1128159 [details] cinder-logs Description of problem: It is not possible that volume will be attached to both instances at the same time, although the volume is allowed for multi-attach with read-only access mode. While trying to attach volume to another instance it is failed with the reason that the volume status is 'in-use' Version-Release number of selected component (if applicable): python-cinderclient-1.5.0-1.el7ost.noarch python-cinder-7.0.1-6.el7ost.noarch openstack-cinder-7.0.1-6.el7ost.noarch How reproducible: 100% Steps to Reproduce: 1. Launch 2 instances 2. Create a multi-attach volume 3. Try to attach the volume to both instances Actual results: Attaching the volume to the second instance has failed with "volume ... status must be 'available'. Currently in 'in-use'..." Expected results: Multi-attach volume should succeed Additional info: [root@cougar01 ~(keystone_admin)]# nova list +--------------------------------------+------+--------+------------+-------------+---------------------+ | ID | Name | Status | Task State | Power State | Networks | +--------------------------------------+------+--------+------------+-------------+---------------------+ | fa4be6b1-12bc-4983-8138-64e326ccec1e | vm1 | ACTIVE | - | Running | public=172.24.4.227 | | a9bfd689-4cad-4d21-9519-1cebdcb9868c | vm2 | ACTIVE | - | Running | public=172.24.4.228 | +--------------------------------------+------+--------+------------+-------------+---------------------+ [root@cougar01 ~(keystone_admin)]# cinder create 1 --allow-multiattach --display-name multi-volume +---------------------------------------+--------------------------------------+ | Property | Value | +---------------------------------------+--------------------------------------+ | attachments | [] | | availability_zone | nova | | bootable | false | | consistencygroup_id | None | | created_at | 2016-02-17T14:07:45.000000 | | description | None | | encrypted | False | | id | ebc300fc-3d3b-49e0-a87f-ea276478130d | | metadata | {} | | migration_status | None | | multiattach | True | | name | multi-volume | | os-vol-host-attr:host | None | | os-vol-mig-status-attr:migstat | None | | os-vol-mig-status-attr:name_id | None | | os-vol-tenant-attr:tenant_id | c0d579620e9845c5819eaa3c29a3c63c | | os-volume-replication:driver_data | None | | os-volume-replication:extended_status | None | | replication_status | disabled | | size | 1 | | snapshot_id | None | | source_volid | None | | status | creating | | user_id | d77426a29acf4400bf3493e4cb58f0f7 | | volume_type | None | +---------------------------------------+--------------------------------------+ [root@cougar01 ~(keystone_admin)]# cinder list cinder help | +--------------------------------------+-----------+------------------+--------------+------+-------------+----------+-------------+-------------+ | ID | Status | Migration Status | Name | Size | Volume Type | Bootable | Multiattach | Attached to | +--------------------------------------+-----------+------------------+--------------+------+-------------+----------+-------------+-------------+ | ebc300fc-3d3b-49e0-a87f-ea276478130d | available | - | multi-volume | 1 | - | false | True | | +--------------------------------------+-----------+------------------+--------------+------+-------------+--- [root@cougar01 ~(keystone_admin)]# cinder readonly-mode-update ebc300fc-3d3b-49e0-a87f-ea276478130d true [root@cougar01 ~(keystone_admin)]# cinder show ebc300fc-3d3b-49e0-a87f-ea276478130d +---------------------------------------+-----------------------------------------+ | Property | Value | +---------------------------------------+-----------------------------------------+ | attachments | [] | | availability_zone | nova | | bootable | false | | consistencygroup_id | None | | created_at | 2016-02-17T14:07:45.000000 | | description | None | | encrypted | False | | id | ebc300fc-3d3b-49e0-a87f-ea276478130d | | metadata | {u'readonly': u'True'} | | migration_status | None | | multiattach | True | | name | multi-volume | | os-vol-host-attr:host | cougar01.scl.lab.tlv.redhat.com@lvm#lvm | | os-vol-mig-status-attr:migstat | None | | os-vol-mig-status-attr:name_id | None | | os-vol-tenant-attr:tenant_id | c0d579620e9845c5819eaa3c29a3c63c | | os-volume-replication:driver_data | None | | os-volume-replication:extended_status | None | | replication_status | disabled | | size | 1 | | snapshot_id | None | | source_volid | None | | status | available | | user_id | d77426a29acf4400bf3493e4cb58f0f7 | | volume_type | None | +---------------------------------------+-----------------------------------------+ [root@cougar01 ~(keystone_admin)]# nova volume-attach fa4be6b1-12bc-4983-8138-64e326ccec1e ebc300fc-3d3b-49e0-a87f-ea276478130d +----------+--------------------------------------+ | Property | Value | +----------+--------------------------------------+ | device | /dev/vdb | | id | ebc300fc-3d3b-49e0-a87f-ea276478130d | | serverId | fa4be6b1-12bc-4983-8138-64e326ccec1e | | volumeId | ebc300fc-3d3b-49e0-a87f-ea276478130d | +----------+--------------------------------------+ [root@cougar01 ~(keystone_admin)]# cinder list +--------------------------------------+-----------+------------------+--------------+------+-------------+----------+-------------+-------------+ | ID | Status | Migration Status | Name | Size | Volume Type | Bootable | Multiattach | Attached to | +--------------------------------------+-----------+------------------+--------------+------+-------------+----------+-------------+-------------+ | ebc300fc-3d3b-49e0-a87f-ea276478130d | attaching | - | multi-volume | 1 | - | false | True | | +--------------------------------------+-----------+------------------+--------------+------+-------------+----------+-------------+-------------+ [root@cougar01 ~(keystone_admin)]# cinder list +--------------------------------------+--------+------------------+--------------+------+-------------+----------+-------------+--------------------------------------+ | ID | Status | Migration Status | Name | Size | Volume Type | Bootable | Multiattach | Attached to | +--------------------------------------+--------+------------------+--------------+------+-------------+----------+-------------+--------------------------------------+ | ebc300fc-3d3b-49e0-a87f-ea276478130d | in-use | - | multi-volume | 1 | - | false | True | fa4be6b1-12bc-4983-8138-64e326ccec1e | +--------------------------------------+--------+------------------+--------------+------+-------------+----------+-------------+--------------------------------------+ * Attaching the volume to the second instance [root@cougar01 ~(keystone_admin)]# nova volume-attach a9bfd689-4cad-4d21-9519-1cebdcb9868c ebc300fc-3d3b-49e0-a87f-ea276478130d ERROR (BadRequest): Invalid volume: volume 'ebc300fc-3d3b-49e0-a87f-ea276478130d' status must be 'available'. Currently in 'in-use' (HTTP 400) (Request-ID: req-5c3d8563-6b72-4b54-a0bb-f41d136dc9ca)
Nova still requires significant changes for multiattach to work, so this will not be testable in OSP8 or OSP9. https://blueprints.launchpad.net/nova/+spec/multi-attach-volume indicates that work is progressing for Newton. Latest patchset is https://review.openstack.org/#/c/304681/ . I suggest revisiting this feature for OSP10 assuming it lands in Newton.