glance client ignores --owner parameter when image-list is paginated

Bug #1480960 reported by George Shuklin
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance Client
Invalid
Undecided
Mangayarkarasi
Ubuntu Cloud Archive
Fix Released
Low
Unassigned
Icehouse
Triaged
Low
Unassigned
Kilo
Triaged
Low
Unassigned
python-glanceclient (Ubuntu)
Fix Released
Low
Unassigned
Trusty
Triaged
Low
Unassigned
Vivid
Won't Fix
Low
Unassigned
Wily
Fix Released
Low
Unassigned

Bug Description

Glance client accepts --owner as parameter, but ignores it (does not send to the server).

Steps to reproduce:

1. Create few images for different tenants
2. Configure environment for the administrator user
3. Request glance image-list --owner=tenant1_uuid

Expected behavior:
List of the images belonging to specified tenant.

Actual behavior:
List of all images.

Snippet from --debug output:

glance --debug image-list --owner=9a4fadf4481e40ad8ddf421a00d9d330
curl -i -X GET -H 'User-Agent: python-glanceclient' -H 'Content-Type: application/octet-stream' -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'X-Auth-Token: ***' --cert None --key None https://lab.internal:9292/v1/images/detail?sort_key=name&sort_dir=asc&limit=20&is_public=None

glance --version
0.14.0

ii python-glanceclient 1:0.14.0-0ubuntu1~cloud0 all Client library for Openstack glance server.

Changed in python-glanceclient:
assignee: nobody → Raga lahari (raga-lahari)
Revision history for this message
Ian Cordasco (icordasc) wrote :

That's a fairly old version of glanceclient and not one that we actively support. Could you test against a more recent version please?

Changed in python-glanceclient:
status: New → Incomplete
Revision history for this message
George Shuklin (george-shuklin) wrote :

Well, I will test against newer version, but this version is still supported by ubuntu as part of the cloud-archive project, AFAIK.

affects: python-glanceclient → cloud-archive
affects: cloud-archive → python-glanceclient
Revision history for this message
Ian Cordasco (icordasc) wrote :

Meaning this is still a problem George?

Revision history for this message
Raga lahari (raga-lahari) wrote :

I tested with glance client 0.15.0 and It works fine with the expected behaviour that's it lists the images belonging to specified tenant.

The behaviour as per implementation is it does not send the owner ID in the curl REST API request calls .
Instead in response it receives all images and filters based on owner parameter and lists only the specified tenant images.

Revision history for this message
George Shuklin (george-shuklin) wrote :

OK, than means that older version for juno/cloud-archive has a problem. It still supported and should be fixed.

Changed in python-glanceclient:
assignee: Raga lahari (raga-lahari) → nobody
Changed in python-glanceclient:
assignee: nobody → Mangayarkarasi (m-mariammal)
Revision history for this message
James Page (james-page) wrote :

Policy prohibits me from pushing an entire new version of glanceclient into the Juno Cloud Archive; we need to identify a specific fix for this problem so that we can produce a stable update.

Changed in cloud-archive:
importance: Undecided → Medium
Revision history for this message
James Page (james-page) wrote :

Actually this does exist in 0.15.0 as well; but you only hit this problem if the image-list call gets paginated due to a large number of images.

I think it was fixed in https://github.com/openstack/python-glanceclient/commit/f98ab688eff8fff4bdb5f650da3516715d62f232 (included in 0.17.0) when the call to get the owner switched from pop -> get, ensuring that its left in the filters dictionary for subsequent calls.

Changed in cloud-archive:
importance: Medium → Low
Changed in python-glanceclient (Ubuntu Trusty):
importance: Undecided → Low
Changed in python-glanceclient (Ubuntu Vivid):
importance: Undecided → Low
Changed in python-glanceclient (Ubuntu Wily):
importance: Undecided → Low
summary: - glance client silently ignores --owner parameter
+ glance client ignores --owner parameter when image-list is paginated
Changed in python-glanceclient (Ubuntu Trusty):
status: New → Triaged
Changed in python-glanceclient (Ubuntu Vivid):
status: New → Triaged
Changed in python-glanceclient (Ubuntu Wily):
status: New → Fix Released
Changed in cloud-archive:
status: New → Triaged
Revision history for this message
James Page (james-page) wrote :

Confirmed for all supported Cloud Archive pockets apart from Liberty (which has the requested commit).

Revision history for this message
George Shuklin (george-shuklin) wrote :

BTW, it is a very annoying issue for operators: we have no way to see all images of the blocked/wiped tenant.

James Page (james-page)
Changed in python-glanceclient (Ubuntu Vivid):
status: Triaged → Won't Fix
Changed in cloud-archive:
status: Triaged → Fix Released
Ian Cordasco (icordasc)
Changed in python-glanceclient:
status: Incomplete → 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.