Bug 1310401 - List Snapshots using 'sort' argument does not work
List Snapshots using 'sort' argument does not work
Status: CLOSED UPSTREAM
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-cinder (Show other bugs)
8.0 (Liberty)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 9.0 (Mitaka)
Assigned To: Eric Harney
nlevinki
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-21 06:15 EST by lkuchlan
Modified: 2016-04-26 21:37 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-04-03 06:45:56 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1536054 None None None 2016-02-22 11:25 EST

  None (edit)
Description lkuchlan 2016-02-21 06:15:26 EST
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 06:16 EST
Created attachment 1128959 [details]
cinder-logs
Comment 3 Sergey Gotliv 2016-04-03 06:46:29 EDT
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.