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 | +--------------------------------------+--------------------------------------+-----------+------+------+
Created attachment 1128959 [details] cinder-logs
The bug is fixed in upstream's cinderclient 1.6