Description of problem: While testing a Cinder multi attach RBD back port (bz1700882)I had to attach a multi-attach volume to instances. With openstack unidentified client commands fails, however with Nova client volume attach works just fine. Version-Release number of selected component (if applicable): python-openstackclient-lang-3.14.3-4.el7ost.noarch python2-openstackclient-3.14.3-4.el7ost.noarch python2-novaclient-10.1.0-1.el7ost.noarch python2-cinderclient-3.5.0-1.el7ost.noarch How reproducible: Every time Steps to Reproduce: 1. Create a multi-attach volume: (overcloud) [stack@undercloud-0 ~]$ cinder create 1 --volume-type multiattach --name MA_vol1 (overcloud) [stack@undercloud-0 ~]$ cinder list +--------------------------------------+-----------+---------+------+-------------+----------+-------------+ | ID | Status | Name | Size | Volume Type | Bootable | Attached to | +--------------------------------------+-----------+---------+------+-------------+----------+-------------+ | 14d0c9e2-7dbf-4459-881e-c332daecac98 | available | MA_vol1 | 1 | multiattach | false | | +--------------------------------------+-----------+---------+------+-------------+----------+-------------+ 2. Boot up an instances, you only need one: (overcloud) [stack@undercloud-0 ~]$ nova list +--------------------------------------+-------+--------+------------+-------------+-----------------------------------+ | ID | Name | Status | Task State | Power State | Networks | +--------------------------------------+-------+--------+------------+-------------+-----------------------------------+ | de218391-f19d-4fb5-af8e-d234c1c0eb2e | inst1 | ACTIVE | - | Running | internal=192.168.0.21, 10.0.0.210 | | a07efd6c-ce6e-43a3-990c-5d515ab0be6d | inst2 | ACTIVE | - | Running | internal=192.168.0.15, 10.0.0.213 | | 7338f7d4-588a-4339-b658-7838a08d364b | inst3 | ACTIVE | - | Running | internal=192.168.0.16, 10.0.0.239 | +--------------------------------------+-------+--------+------------+-------------+-----------------------------------+ 3. Try to attach a multiattach volume to an instance, with unified client: (overcloud) [stack@undercloud-0 ~]$ openstack server add volume inst1 MA_vol1 Multiattach volumes are only supported starting with compute API version 2.60. (HTTP 400) (Request-ID: req-dd2088e7-bf52-4334-84b6-3c731afefb15) Volume fails to attach. 4. Try to attach same volume to same instance using Nova client, volume is successfully attached: (overcloud) [stack@undercloud-0 ~]$ nova volume-attach inst1 14d0c9e2-7dbf-4459-881e-c332daecac98 auto +----------+--------------------------------------+ | Property | Value | +----------+--------------------------------------+ | device | /dev/vdb | | id | 14d0c9e2-7dbf-4459-881e-c332daecac98 | | serverId | de218391-f19d-4fb5-af8e-d234c1c0eb2e | | volumeId | 14d0c9e2-7dbf-4459-881e-c332daecac98 | +----------+--------------------------------------+ Volume is attached (overcloud) [stack@undercloud-0 ~]$ cinder list +--------------------------------------+--------+---------+------+-------------+----------+--------------------------------------+ | ID | Status | Name | Size | Volume Type | Bootable | Attached to | +--------------------------------------+--------+---------+------+-------------+----------+--------------------------------------+ | 14d0c9e2-7dbf-4459-881e-c332daecac98 | in-use | MA_vol1 | 1 | multiattach | false | de218391-f19d-4fb5-af8e-d234c1c0eb2e | +--------------------------------------+--------+---------+------+-------------+----------+--------------------------------------+ Actual results: (overcloud) [stack@undercloud-0 ~]$ openstack server add volume inst1 MA_vol1 Multiattach volumes are only supported starting with compute API version 2.60. (HTTP 400) (Request-ID: req-dd2088e7-bf52-4334-84b6-3c731afefb15) Expected results: Well if Nova client attaches volume Openstack's unified client should also manage to attach volume. Additional info:
Hi, You will need to explicitly pass the necessary compute API microversion when you run the unified client command, for example: openstack --os-compute-api-version 2.60 server add volume inst1 MA_vol1 The unified client defaults to using the minimum supported API microversion whereas the legacy nova client defaults to using the maximum supported API microversion, so this is expected behavior.
We've added the Documentation keyword in hopes of getting a note added to openstackclient documentation that explains the default compute API version behavior of the client (default to minimum support compute API microversion) and the need to explicitly pass the --os-compute-api-version if a later compute API microversion is required to issue a particular request to the compute API.
Converting this to a documentation bug since it is a docs-only fix.
Updated content available on the Customer Portal: https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.1/html-single/instances_and_images_guide/index#attaching-a-volume-to-multiple-instances_instances