Change the CLI document for the extend-attached-volume

Bug #1871759 reported by Wonil Choi
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
In Progress
Undecided
Unassigned

Bug Description

This bug tracker is for errors with the documentation, use the following as a template and remove or add fields as you see fit. Convert [ ] into [x] to check boxes:

- [x] This doc is inaccurate in this way: ______

In https://docs.openstack.org/cinder/latest/cli/cli-manage-volumes.html#resize-a-volume
,
`Resize a volume` section does not consider the extend-attached-volume (in-use volumes).

BP is here https://blueprints.launchpad.net/cinder/+spec/extend-attached-volume

-----------------------------------
Release: on 2018-09-28 09:24:01
SHA: d1c1ce1d99f69d636670316131413748e4ba2909
Source: https://opendev.org/openstack/cinder/src/doc/source/cli/cli-manage-volumes.rst
URL: https://docs.openstack.org/cinder/latest/cli/cli-manage-volumes.html

Tags: doc
Wonil Choi (wonil22)
description: updated
Changed in cinder:
assignee: nobody → Tushar Trambak Gite (tushargite96)
Changed in cinder:
status: New → In Progress
Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :
Revision history for this message
Christian Rohmann (christian-rohmann) wrote :

I just attempted to use the documented command from https://review.opendev.org/c/openstack/cinder/+/746929 but that failed with a syntax error on the OpenStack client to select a microversion of the

1) List volumes
--- cut ---
# openstack volume list -f csv -c ID -c Status -c Size

"ID","Status","Size"
"0f92d1d8-456b-41b9-a53e-b8cdb959a42e","in-use",10
"d9bbb60b-0b83-45d4-8088-70160cd1d12d","in-use",10
--- cut ---

As you can see two attached volumes with 10G size each.

2) Attempt to extend one volume to 20G
--- cut ---
# openstack volume set d9bbb60b-0b83-45d4-8088-70160cd1d12d --size 20
Failed to set volume size: Volume is in in-use state, it must be available before size can be extended
One or more of the set operations failed
--- cut ---

3) Now try to extend using the api-version option as documented by your patch

--- cut ---
# openstack volume --os-volume-api-version 3.42 set d9bbb60b-0b83-45d4-8088-70160cd1d12d --size 20

volume version 3.42 is not in supported versions: 1, 2, 3
Invalid volume client version '3.42'. must be one of: 2, 3

# openstack volume --os-volume-api-version 3 set d9bbb60b-0b83-45d4-8088-70160cd1d12d --size 20

volume version 3.42 is not in supported versions: 1, 2, 3
Invalid volume client version '3.42'. must be one of: 2, 3
--- cut ---

Maybe just setting the major version to 3 is enough?

--- cut ---
# openstack volume --os-volume-api-version 3 set d9bbb60b-0b83-45d4-8088-70160cd1d12d --size 20
Failed to set volume size: Volume is in in-use state, it must be available before size can be extended
One or more of the set operations failed
--- cut ---

4) Using the cinder client to extend the volume just works

--- cut ---
# cinder extend d9bbb60b-0b83-45d4-8088-70160cd1d12d 20

# openstack volume list -f csv -c ID -c Status -c Size

"ID","Status","Size"
"0f92d1d8-456b-41b9-a53e-b8cdb959a42e","in-use",10
"d9bbb60b-0b83-45d4-8088-70160cd1d12d","in-use",20
--- cut ---

FYI the supported versions in my OpenStack Train environment are ...

--- cut ---
# openstack versions show -f csv

"Region Name","Service Type","Version","Status","Endpoint","Min Microversion","Max Microversion"
"fra","block-storage","2.0","DEPRECATED","https://volume.cloud.redacted/v2/","",""
"fra","block-storage","3.0","CURRENT","https://volume.cloud.redacted/v3/","3.0","3.59"
--- cut ---

Revision history for this message
Luigi Toscano (ltoscano) wrote :

I see you have used
openstack volume --os-volume-api-version 3.42 set d9bbb60b-0b83-45d4-8088-70160cd1d12d --size 20

But --os-* options applies directly to the openstack command, can you please try:

openstack --os-volume-api-version 3.42 volume set d9bbb60b-0b83-45d4-8088-70160cd1d12d --size 20
?

Revision history for this message
Christian Rohmann (christian-rohmann) wrote :

Thanks for the quick reply, but I got the same result:

--- cut ---
# openstack --os-volume-api-version 3.42 volume set d9bbb60b-0b83-45d4-8088-70160cd1d12d --size 20

volume version 3.42 is not in supported versions: 1, 2, 3
Invalid volume client version '3.42'. must be one of: 2, 3
--- cut ---

Revision history for this message
Luigi Toscano (ltoscano) wrote :

openstack --os-volume-api-version 3.42 only works with the yet-unreleased version of python-openstackclient, so unless you want to try that in a virtualenv, please continue to use the `cinder` command.
https://review.opendev.org/c/openstack/python-openstackclient/+/761633

Revision history for this message
Christian Rohmann (christian-rohmann) wrote :

Ah, thanks a lot for the update.

Even when using cinder (which works) - the VM is not notified about the increased volume size.
I already posted about my observations on the ML http://lists.openstack.org/pipermail/openstack-discuss/2021-February/020476.html, but am wondering if this is in any way related?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 18.0.0.0b1

This issue was fixed in the openstack/cinder 18.0.0.0b1 development milestone.

Changed in cinder:
assignee: Tushar Trambak Gite (tushargite96) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.