v1 client may truncate listings

Bug #1444056 reported by Stuart McLaren
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Glance Client
Won't Fix
Undecided
Bathri Ajay Raj

Bug Description

If I set api_limit_max = 10 in glance-api.conf:

and I have 71 images and list them with v2 I see all of them:

$ glance --os-image-api-version 2 image-list --page-size 80 | wc
     71 283 5325

Each response from the server correctly contains only 10 images.

If I set:

glance-registry.conf
 api_limit_max = 10

and list:

$ glance --os-image-api-version 1 image-list --page-size 80 | wc
     14 138 1358

the number of images returned is truncated.

Revision history for this message
Stuart McLaren (stuart-mclaren) wrote :

$ glance --os-image-api-version 1 image-list --page-size 80 |grep raw | wc -l
10

Revision history for this message
Erno Kuvaja (jokke) wrote :

Is this client truncating the listing or api server truncating the listing?

Revision history for this message
Stuart McLaren (stuart-mclaren) wrote :

The v1 client I think.

In my testing (above) the v2 server returns the list in batches of 10 (api_limit_max) and the v2 client seems to handle that ok.
It seems the v1 client assumes that if the number of images returned is less than the page size that that means there are no more images to list, and no next response is sent.

Arguably there should be a header in the server's response saying 'more to come'. I don't know if that is the case in v2 or not, or the v2 client just keeps retrying until it gets an empty list.

I think this is a corner case, and won't typically happen unless a user specifies page_size > 1000 (the default server limit).

Revision history for this message
Erno Kuvaja (jokke) wrote :

Fair enough, thanks. I'll move this bug to the client then.

affects: glance → python-glanceclient
Changed in python-glanceclient:
assignee: nobody → Bathri Ajay Raj (bathri-s)
Changed in python-glanceclient:
status: New → Confirmed
Changed in python-glanceclient:
status: Confirmed → In Progress
Revision history for this message
Ian Cordasco (icordasc) wrote :

Given the deprecation of the v1 API, I'm going to close this as won't fix. This has also been stale for well over a year. It seems no one will end up fixing this in reality prior to v1 being completely removed.

Changed in python-glanceclient:
status: In Progress → Won't Fix
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.