Bug 1310401 - List Snapshots using 'sort' argument does not work
Summary: List Snapshots using 'sort' argument does not work
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-cinder
Version: 8.0 (Liberty)
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 9.0 (Mitaka)
Assignee: Eric Harney
QA Contact: nlevinki
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-21 11:15 UTC by lkuchlan
Modified: 2016-04-27 01:37 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-03 10:45:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
cinder-logs (deleted)
2016-02-21 11:15 UTC, lkuchlan
no flags Details
cinder-logs (253.50 KB, application/x-tar)
2016-02-21 11:16 UTC, lkuchlan
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1536054 0 None None None 2016-02-22 16:25:31 UTC

Description lkuchlan 2016-02-21 11:15:26 UTC
Description of problem:
List Snapshots using 'sort' argument does not work 

Version-Release number of selected component (if applicable):
python-cinderclient-1.5.0-1.el7ost.noarch
openstack-cinder-7.0.1-6.el7ost.noarch
python-cinder-7.0.1-6.el7ost.noarch

How reproducible:
100%

Steps to Reproduce:
1. Create several snapshots from volume
2. Try to list the snapshots using 'spot' argument
   cinder snapshot-list --sort <key>[:<direction>]
   for example: cinder snapshot-list --sort id:asc

Actual results:
List Snapshots using 'sort' argument does not work 

Expected results:
Snapshots List should be sorted according to the key and the direction

Additional info:


[stack@instack ~]$ cinder snapshot-list
+--------------------------------------+--------------------------------------+-----------+------+------+
|                  ID                  |              Volume ID               |   Status  | Name | Size |
+--------------------------------------+--------------------------------------+-----------+------+------+
| 2c793b1e-4f0c-43ee-bfba-64d3c97c1733 | ada34930-ae75-4d89-a646-4f87d47d13a4 |   error   | snp3 |  1   |
| 3b666dd7-7d9f-4d4d-bae7-b84bed9fb97d | ada34930-ae75-4d89-a646-4f87d47d13a4 | available | snp2 |  1   |
| 60147e75-34f7-4306-841b-3ad4f9f86d22 | ada34930-ae75-4d89-a646-4f87d47d13a4 | available | snp0 |  1   |
| 649fd8c5-701b-498f-a7ea-6303d2dbab8e | ada34930-ae75-4d89-a646-4f87d47d13a4 |   error   | snp5 |  1   |
| 7c27290a-8eca-4475-81b8-17405adab649 | ada34930-ae75-4d89-a646-4f87d47d13a4 |   error   | snp8 |  1   |
| 89d281ad-a8a9-4298-bdb2-96d192d319f2 | ada34930-ae75-4d89-a646-4f87d47d13a4 |   error   | snp9 |  1   |
| a2986850-fd32-4cc4-ab72-d4cd7c4fab08 | ada34930-ae75-4d89-a646-4f87d47d13a4 |   error   | snp7 |  1   |
| b3d68f3b-53ea-4099-8345-619d165ac827 | ada34930-ae75-4d89-a646-4f87d47d13a4 |   error   | snp4 |  1   |
| b5b0f9bd-7d84-4e81-9e39-37c3d6ae6c77 | ada34930-ae75-4d89-a646-4f87d47d13a4 |   error   | snp6 |  1   |
| fc81b9aa-7a83-4124-a9d5-9385f673a70b | ada34930-ae75-4d89-a646-4f87d47d13a4 | available | snp1 |  1   |
+--------------------------------------+--------------------------------------+-----------+------+------+


Snapshot list with 'sort' argument:

[stack@instack ~]$ cinder snapshot-list --sort status:asc
+--------------------------------------+--------------------------------------+-----------+------+------+
|                  ID                  |              Volume ID               |   Status  | Name | Size |
+--------------------------------------+--------------------------------------+-----------+------+------+
| 2c793b1e-4f0c-43ee-bfba-64d3c97c1733 | ada34930-ae75-4d89-a646-4f87d47d13a4 |   error   | snp3 |  1   |
| 3b666dd7-7d9f-4d4d-bae7-b84bed9fb97d | ada34930-ae75-4d89-a646-4f87d47d13a4 | available | snp2 |  1   |
| 60147e75-34f7-4306-841b-3ad4f9f86d22 | ada34930-ae75-4d89-a646-4f87d47d13a4 | available | snp0 |  1   |
| 649fd8c5-701b-498f-a7ea-6303d2dbab8e | ada34930-ae75-4d89-a646-4f87d47d13a4 |   error   | snp5 |  1   |
| 7c27290a-8eca-4475-81b8-17405adab649 | ada34930-ae75-4d89-a646-4f87d47d13a4 |   error   | snp8 |  1   |
| 89d281ad-a8a9-4298-bdb2-96d192d319f2 | ada34930-ae75-4d89-a646-4f87d47d13a4 |   error   | snp9 |  1   |
| a2986850-fd32-4cc4-ab72-d4cd7c4fab08 | ada34930-ae75-4d89-a646-4f87d47d13a4 |   error   | snp7 |  1   |
| b3d68f3b-53ea-4099-8345-619d165ac827 | ada34930-ae75-4d89-a646-4f87d47d13a4 |   error   | snp4 |  1   |
| b5b0f9bd-7d84-4e81-9e39-37c3d6ae6c77 | ada34930-ae75-4d89-a646-4f87d47d13a4 |   error   | snp6 |  1   |
| fc81b9aa-7a83-4124-a9d5-9385f673a70b | ada34930-ae75-4d89-a646-4f87d47d13a4 | available | snp1 |  1   |
+--------------------------------------+--------------------------------------+-----------+------+------+


[stack@instack ~]$ cinder snapshot-list --sort name:asc
+--------------------------------------+--------------------------------------+-----------+------+------+
|                  ID                  |              Volume ID               |   Status  | Name | Size |
+--------------------------------------+--------------------------------------+-----------+------+------+
| 2c793b1e-4f0c-43ee-bfba-64d3c97c1733 | ada34930-ae75-4d89-a646-4f87d47d13a4 |   error   | snp3 |  1   |
| 3b666dd7-7d9f-4d4d-bae7-b84bed9fb97d | ada34930-ae75-4d89-a646-4f87d47d13a4 | available | snp2 |  1   |
| 60147e75-34f7-4306-841b-3ad4f9f86d22 | ada34930-ae75-4d89-a646-4f87d47d13a4 | available | snp0 |  1   |
| 649fd8c5-701b-498f-a7ea-6303d2dbab8e | ada34930-ae75-4d89-a646-4f87d47d13a4 |   error   | snp5 |  1   |
| 7c27290a-8eca-4475-81b8-17405adab649 | ada34930-ae75-4d89-a646-4f87d47d13a4 |   error   | snp8 |  1   |
| 89d281ad-a8a9-4298-bdb2-96d192d319f2 | ada34930-ae75-4d89-a646-4f87d47d13a4 |   error   | snp9 |  1   |
| a2986850-fd32-4cc4-ab72-d4cd7c4fab08 | ada34930-ae75-4d89-a646-4f87d47d13a4 |   error   | snp7 |  1   |
| b3d68f3b-53ea-4099-8345-619d165ac827 | ada34930-ae75-4d89-a646-4f87d47d13a4 |   error   | snp4 |  1   |
| b5b0f9bd-7d84-4e81-9e39-37c3d6ae6c77 | ada34930-ae75-4d89-a646-4f87d47d13a4 |   error   | snp6 |  1   |
| fc81b9aa-7a83-4124-a9d5-9385f673a70b | ada34930-ae75-4d89-a646-4f87d47d13a4 | available | snp1 |  1   |
+--------------------------------------+--------------------------------------+-----------+------+------+

Comment 2 lkuchlan 2016-02-21 11:16:37 UTC
Created attachment 1128959 [details]
cinder-logs

Comment 3 Sergey Gotliv 2016-04-03 10:46:29 UTC
The bug is fixed in upstream's cinderclient 1.6


Note You need to log in before you can comment on or make changes to this bug.