Description of problem: Hot-resize of the attached volume is implemented in recent OpenStack. nova support to enable extension of an attached volume (nova) https://blueprints.launchpad.net/nova/+spec/nova-support-attached-volume-extend Allow the extend of a cinder volume while it is attached to a VM. (cinder) https://blueprints.launchpad.net/cinder/+spec/extend-attached-volume RHOSP13, which is created based on Queens release, includes this feature, but OpenStack client does not allow this operation, by rejecting the request at client level. I tried to specify volume api version used, but it does not work. ~~~ $ openstack volume set --size 20 testvolume Failed to set volume size: Volume is in in-use state, it must be available before size can be extended ~~~ On the other hand, cinder client allows to resize the attached volume, by specifying api version. $ cinder --os-volume-api-version 3.42 extend testvolume 20 How reproducible: Always Steps to Reproduce: 1. Create a new volume 2. Attach the volume to a nova instance 3. Run the "openstack volume set" command Actual results: openstack command shows error, and does not perform resize operation Expected results: openstack command allows resize operation, and sends request to volume api Additional info:
The upstream community has struggled with the functionality gap between the "cinder" and "openstack volume" commands. Unfortunately, one big problem is "openstack volume" currently does not support API microversions, and an effort to add support seems stalled [1]. I'll target this for OSP-16 with the hope that the situation upstream improves during the Train cycle. [1] https://review.openstack.org/590807
This feature is not officially supported, plan is to support it in 16 so approving this bug for 16.
Appears this will miss 16.0, can the storage DFG re-target for 16.1/17.0?
Done thanks for the heads up Lee! We will use the cinder client to start with.
Looks like someone in the community submitted a patch for this in Wallaby.
Verified on: python-openstackclient-lang-5.5.1-0.20220427021748.53f1efa.el9ost.noarch On an LVM backed deployment, booted up an instance: (overcloud) [stack@undercloud-0 ~]$ nova list +--------------------------------------+-------+--------+------------+-------------+-----------------------------------+ | ID | Name | Status | Task State | Power State | Networks | +--------------------------------------+-------+--------+------------+-------------+-----------------------------------+ | 6c3e00b4-2c38-44fe-96a9-44881235e125 | inst1 | ACTIVE | - | Running | internal=192.168.0.22, 10.0.0.238 | +--------------------------------------+-------+--------+------------+-------------+-----------------------------------+ Create a Cinder volume: (overcloud) [stack@undercloud-0 ~]$ cinder create 3 --name volA +--------------------------------+--------------------------------------+ | Property | Value | +--------------------------------+--------------------------------------+ | attachments | [] | | availability_zone | nova | | bootable | false | | consistencygroup_id | None | | created_at | 2022-05-15T07:01:30.000000 | | description | None | | encrypted | False | | id | b37bf456-8da7-446c-b6a1-202c3d477b97 | | metadata | {} | | migration_status | None | | multiattach | False | | name | volA | | 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 | bf419af7009a41489a85bb52368df800 | | replication_status | None | | size | 3 | | snapshot_id | None | | source_volid | None | | status | creating | | updated_at | None | | user_id | 2837122f17db4eaabe75aaf6993343bb | | volume_type | tripleo | +--------------------------------+--------------------------------------+ (overcloud) [stack@undercloud-0 ~]$ cinder list +--------------------------------------+-----------+------+------+-------------+----------+-------------+ | ID | Status | Name | Size | Volume Type | Bootable | Attached to | +--------------------------------------+-----------+------+------+-------------+----------+-------------+ | b37bf456-8da7-446c-b6a1-202c3d477b97 | available | volA | 3 | tripleo | false | | +--------------------------------------+-----------+------+------+-------------+----------+-------------+ Attach volume to instance: (overcloud) [stack@undercloud-0 ~]$ nova volume-attach inst1 b37bf456-8da7-446c-b6a1-202c3d477b97 +-----------------------+--------------------------------------+ | Property | Value | +-----------------------+--------------------------------------+ | delete_on_termination | False | | device | /dev/vdb | | id | b37bf456-8da7-446c-b6a1-202c3d477b97 | | serverId | 6c3e00b4-2c38-44fe-96a9-44881235e125 | | tag | - | | volumeId | b37bf456-8da7-446c-b6a1-202c3d477b97 | +-----------------------+--------------------------------------+ (overcloud) [stack@undercloud-0 ~]$ cinder list +--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+ | ID | Status | Name | Size | Volume Type | Bootable | Attached to | +--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+ | b37bf456-8da7-446c-b6a1-202c3d477b97 | in-use | volA | 3 | tripleo | false | 6c3e00b4-2c38-44fe-96a9-44881235e125 | +--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+ Inside the instance we confirm the original size of 3G (overcloud) [stack@undercloud-0 ~]$ ssh cirros.0.238 Warning: Permanently added '10.0.0.238' (ECDSA) to the list of known hosts. cirros.0.238's password: $ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT vda 253:0 0 1G 0 disk |-vda1 253:1 0 1015M 0 part / `-vda15 253:15 0 8M 0 part vdb 253:16 0 3G 0 disk Now lets extend the volume: (overcloud) [stack@undercloud-0 ~]$ openstack --os-volume-api-version 3.42 volume set --size 5 volA /usr/lib/python3.9/site-packages/ansible/_vendor/__init__.py:42: UserWarning: One or more Python packages bundled by this ansible-core distribution were already loaded (pyparsing). This may result in undefined behavior. warnings.warn('One or more Python packages bundled by this ansible-core distribution were already ' (overcloud) [stack@undercloud-0 ~]$ cinder list +--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+ | ID | Status | Name | Size | Volume Type | Bootable | Attached to | +--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+ | b37bf456-8da7-446c-b6a1-202c3d477b97 | in-use | volA | 5 | tripleo | false | 6c3e00b4-2c38-44fe-96a9-44881235e125 | +--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+ Seems to work OK, despite the warning. Lets recheck inside the instance volA/vdb bumped to 5G from 3G cirros.0.238's password: $ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT vda 253:0 0 1G 0 disk |-vda1 253:1 0 1015M 0 part / `-vda15 253:15 0 8M 0 part vdb 253:16 0 5G 0 disk Good to verify.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Release of components for Red Hat OpenStack Platform 17.0 (Wallaby)), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2022:6543