missing volume extend

Bug #1413954 reported by Tim Bell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
High
Steve Martinelli

Bug Description

The cinder extend command allows a user to make a volume larger. There does not seem to be an equivalent command in OSC (and it is missing from the list in https://wiki.openstack.org/wiki/OpenStackClient/Commands)

Could this be implemented to fill in a functional gap ?

Thanks

Revision history for this message
Steve Martinelli (stevemar) wrote :

I agree that this is a bug, just wondering how we want to approach this...

Based on the CLI docs, the functionality of the 'extend' command is pretty limited:

  cinder extend

  usage: cinder extend <volume> <new-size>

I'm wondering if we want to bundle this into the 'osc volume set' command?
http://docs.openstack.org/developer/python-openstackclient/command-objects/volume.html#volume-set

rather than creating a new one-off verb 'extend', and it seems to logically fit into the concept of changing a volume's property.

Changed in python-openstackclient:
status: New → Confirmed
milestone: none → m8
importance: Undecided → High
Revision history for this message
Steve Martinelli (stevemar) wrote :
Changed in python-openstackclient:
assignee: nobody → Steve Martinelli (stevemar)
Revision history for this message
Tim Bell (tim-bell) wrote :

I like including it into volume set. In the end, the size is a characteristic. It also allows us to cover the potential decrease function in future. So, just specifying a new size in the set command would suit me fine (with appropriate error checking to warn where shrinking).

Revision history for this message
Steve Martinelli (stevemar) wrote :

Alright, we can add some basic checking before firing off the extend request, it'll look like:

(osc)$ openstack volume create myvol1 --size 1
(osc)$ openstack volume set myvol1 --size 2
(osc)$ openstack volume list
+--------------------------------------+--------------+-----------+------+-------------+
| ID | Display Name | Status | Size | Attached to |
+--------------------------------------+--------------+-----------+------+-------------+
| d684695f-3911-4d64-b64e-d0f073ceb75f | myvol1 | available | 2 | |
+--------------------------------------+--------------+-----------+------+-------------+
(osc)$ openstack volume set myvol1 --size 1
ERROR: openstackclient.shell Cannot shrink a volume
(osc)$ openstack volume list
+--------------------------------------+--------------+-----------+------+-------------+
| ID | Display Name | Status | Size | Attached to |
+--------------------------------------+--------------+-----------+------+-------------+
| d684695f-3911-4d64-b64e-d0f073ceb75f | myvol1 | available | 2 | |
+--------------------------------------+--------------+-----------+------+-------------+
(osc)$ openstack volume set myvol1 --size 3
(osc)$ openstack volume list
+--------------------------------------+--------------+-----------+------+-------------+
| ID | Display Name | Status | Size | Attached to |
+--------------------------------------+--------------+-----------+------+-------------+
| d684695f-3911-4d64-b64e-d0f073ceb75f | myvol1 | available | 3 | |
+--------------------------------------+--------------+-----------+------+-------------+

Changed in python-openstackclient:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master)

Reviewed: https://review.openstack.org/149859
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=4ff020006ebc96348822f50c5b484ee45e5f1b41
Submitter: Jenkins
Branch: master

commit 4ff020006ebc96348822f50c5b484ee45e5f1b41
Author: Steve Martinelli <email address hidden>
Date: Sun Jan 25 00:13:26 2015 -0500

    Add the ability to extend volumes in `osc volume set`

    Create a --size option for volume set, so the user may extend
    a volume's size.

    Change-Id: Ic8d3396d788a14ea1e10bf1da73edfd7f5d85070
    Closes-Bug: #1413954

Changed in python-openstackclient:
status: In Progress → Fix Committed
Dean Troyer (dtroyer)
Changed in python-openstackclient:
status: Fix Committed → Fix Released
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.