image-list --page-size <limit> returns all images

Bug #1115677 reported by Anita Kuno
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Invalid
Undecided
Anita Kuno

Bug Description

A curl request with limit=5 returned all 7 images available.

-H 'Content-Type: application/json'
-H 'User-Agent: python-glanceclient'
http://50.56.25.223:9292/v1/images/detail?sort_key=name&sort_dir=asc&limit=5&marker=e8cb3369-4b27-4bba-943d-4f4389a1ef43

{"images": [{
"status": "active", "name": "cirros-0.3.0-x86_64-uec-ramdisk"}, {
"status": "active", "name": "cirros-0.3.0-x86_64-uec-kernel"}, {
"status": "active", "name": "cirros-0.3.0-x86_64-uec"}, {
"status": "queued", "name": null}, {
"status": "queued", "name": null}, {
"status": "queued", "name": null}, {
"status": "queued", "name": null}]}

Anita Kuno (anteaya)
Changed in python-glanceclient:
assignee: nobody → Anita Kuno (akuno)
Revision history for this message
Anita Kuno (anteaya) wrote :

Investigating further, I learn with v1 api, setting page-size to 0 returns no images successfuly; setting page-size between 1 and 4 returns a 500 internal server error; and setting page-size to 5 to 7 returns all 7 images.

With v2 api, page-size any setting between 1 and 7, returns all 7 images. Setting page-size to 0 returns 0 images.

Revision history for this message
Anita Kuno (anteaya) wrote :

I realize now that I had two problems when I filed this bug.

1) I didn't fully understand the expected behaviour: http://docs.openstack.org/api/openstack-compute/2/content/Paginated_Collections-d1e664.html

2) I was testing with empty image placeholders (which caused the server errors) when I should have been testing with real images. Real images work as expected, outlined in the above linked document.

Changed in python-glanceclient:
status: New → Invalid
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.