allow reset-state of multiple objects

Bug #1256069 reported by Dafna Ron
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-cinderclient
Fix Released
Wishlist
Eric Harney

Bug Description

if we have a failure during an action we are running on multiple volumes we might have multiple volumes with state which we need to reset.

currently I can only run reset-state for a single object, but it would be helpful if we could do it for multiple objects (primarily if we currently volume state remains in error in case of a failure)

root@XXXX ~(keystone_admin)]# cinder list
+--------------------------------------+-----------+--------------+------+-------------+----------+--------------------------------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+----------+--------------------------------------+
| 1121404d-372f-4c9e-9f00-8fa8e253c064 | in-use | small | 2 | None | false | 8401c157-032b-47d5-bcf9-e2fc413f333c |
| 2f2abeea-44b7-43f5-9536-655077875bf5 | in-use | dafna | 6 | None | false | 4ab92098-6587-4afa-9c41-c7adf93d76e0 |
| 990d2111-240d-4184-bb76-e6a82b2fda81 | available | user | 3 | None | false | |
| a6b9603d-1047-4965-86a0-4f15d34876b5 | extending | test | 4 | None | false | |
| ea526067-a6bd-4e58-9db2-d0e58d166022 | extending | dafna1 | 3 | None | false | |
+--------------------------------------+-----------+--------------+------+-------------+----------+--------------------------------------+
[root@XXXX ~(keystone_admin)]# cinder reset-state a6b9603d-1047-4965-86a0-4f15d34876b5 ea526067-a6bd-4e58-9db2-d0e58d166022
usage: cinder [--version] [--debug] [--os-username <auth-user-name>]
              [--os-password <auth-password>]
              [--os-tenant-name <auth-tenant-name>]
              [--os-tenant-id <auth-tenant-id>] [--os-auth-url <auth-url>]
              [--os-region-name <region-name>] [--service-type <service-type>]
              [--service-name <service-name>]
              [--volume-service-name <volume-service-name>]
              [--endpoint-type <endpoint-type>]
              [--os-volume-api-version <volume-api-ver>]
              [--os-cacert <ca-certificate>] [--retries <retries>]
              <subcommand> ...
error: unrecognized arguments: ea526067-a6bd-4e58-9db2-d0e58d166022
Try 'cinder help ' for more information.
[root@XXXX ~(keystone_admin)]# cinder reset-state a6b9603d-1047-4965-86a0-4f15d34876b5
[root@XXXX ~(keystone_admin)]# cinder reset-state ea526067-a6bd-4e58-9db2-d0e58d166022
[root@XXXX ~(keystone_admin)]# cinder list
+--------------------------------------+-----------+--------------+------+-------------+----------+--------------------------------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+----------+--------------------------------------+
| 1121404d-372f-4c9e-9f00-8fa8e253c064 | in-use | small | 2 | None | false | 8401c157-032b-47d5-bcf9-e2fc413f333c |
| 2f2abeea-44b7-43f5-9536-655077875bf5 | in-use | dafna | 6 | None | false | 4ab92098-6587-4afa-9c41-c7adf93d76e0 |
| 990d2111-240d-4184-bb76-e6a82b2fda81 | available | user | 3 | None | false | |
| a6b9603d-1047-4965-86a0-4f15d34876b5 | available | test | 4 | None | false | |
| ea526067-a6bd-4e58-9db2-d0e58d166022 | available | dafna1 | 3 | None | false | |
+--------------------------------------+-----------+--------------+------+-------------+----------+--------------------------------------+

Eric Harney (eharney)
Changed in python-cinderclient:
importance: Undecided → Wishlist
Changed in python-cinderclient:
assignee: nobody → Eric Harney (eharney)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-cinderclient (master)

Reviewed: https://review.openstack.org/59574
Committed: https://git.openstack.org/cgit/openstack/python-cinderclient/commit/?id=0e2bd33265de840787a3d9e31f7a14e83c44acf9
Submitter: Jenkins
Branch: master

commit 0e2bd33265de840787a3d9e31f7a14e83c44acf9
Author: Eric Harney <email address hidden>
Date: Mon Dec 2 18:05:54 2013 -0500

    Reset-state and snapshot-reset-state for multiple objects

    This allows a user to call reset-state or snapshot-reset-state on a
    list of objects. The behavior is modeled after a similar change to
    delete multiple volumes.

    $ cinder reset-state good_volume good_volume_2
    <no output>

    Error behavior is as follows:

    One success/one failure:
    $ cinder reset-state good_volume asdf
    Reset state for volume asdf failed: No volume with a name or ID of 'asdf' exists.

    One failure:
    $ cinder reset-state asdf
    ERROR: Reset state for volume asdf failed: No volume with a name or ID of 'asdf' exists.

    Two failures:
    $ cinder reset-state asdf qwert
    Reset state for volume asdf failed: No volume with a name or ID of 'asdf' exists.
    Reset state for volume qwert failed: No volume with a name or ID of 'qwert' exists.
    ERROR: Unable to reset the state for any of the specified volumes.

    Related-Bug: 1241941
    Closes-Bug: 1256069
    Change-Id: Id0a36fb7de0d69be0dac98ea04e4708775250b7a

Changed in python-cinderclient:
status: In Progress → Fix Committed
Changed in python-cinderclient:
milestone: none → 1.3.1
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.