"image list" commands new --limit and --marker options have unintended side effects

Bug #1549864 reported by Sebastian
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-openstackclient
New
Undecided
Unassigned

Bug Description

This Bugreport: https://bugs.launchpad.net/python-openstackclient/+bug/1540988 leads to new command line options for the "image list" command and some removed code.

But the problem here lies with the serversides api default limit of 25 and the order of application of the several command line options. While limit or marker are applied first along the api request, e.g. property or sortorder are applied on the received data in a second step.
see lines 460 - 508
https://git.openstack.org/cgit/openstack/python-openstackclient/tree/openstackclient/image/v2/image.py#n460

So the list is already shortened before any filter or sorting is applied, missing images you were looking for.

This Problem didn't exist in the old code, because by default all images were fetched: https://git.openstack.org/cgit/openstack/python-openstackclient/tree/openstackclient/image/v2/image.py?id=258c1102cc6b93a860bcd7cc083d4e14ae0025ce#n479

My workaround for now is to set an extreme limit...

I guess, the serverside api doesn't allow filter and sorting. As long as this is the case, the code should be changed to ignore limit or marker if any clientside filter or sort is set. And this should be documented.

Sebastian (s-opel)
description: updated
Sebastian (s-opel)
description: updated
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.