← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1432701] [NEW] Glance API fail to list 'deleted' images

 

Public bug reported:

Even with user admin context, and following the API-ref for image/detail
api and attempt to query deleted images will get failure for both ways.

1) 
[root@node191 glance]# 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: 2e65fd85f8eb41e2a33ed5b401754798' http://10.104.0.191:9292/v1/images/detail?status=deleted
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 14
X-Openstack-Request-Id: req-req-2599f890-6986-435b-b23e-abafcd2b85ae
Date: Mon, 16 Mar 2015 15:21:46 GMT

{"images": []}

2) And 
[root@node191 glance]# 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: 2e65fd85f8eb41e2a33ed5b401754798' http://10.104.0.191:9292/v1/images/detail?deleted=True
Will also list all the Active images without any deleted images. 

It does appears that glance will never allow the filters with 'deleted' key passing from the check below.
https://github.com/openstack/glance/blob/master/glance/api/v1/images.py#L387

And in registry code will never get filter with 'deleted', so 'deleted' will always being false.
https://github.com/openstack/glance/blob/master/glance/registry/api/v1/images.py#L249

** Affects: glance
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1432701

Title:
  Glance API fail to list 'deleted' images

Status in OpenStack Image Registry and Delivery Service (Glance):
  New

Bug description:
  Even with user admin context, and following the API-ref for
  image/detail api and attempt to query deleted images will get failure
  for both ways.

  1) 
  [root@node191 glance]# 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: 2e65fd85f8eb41e2a33ed5b401754798' http://10.104.0.191:9292/v1/images/detail?status=deleted
  HTTP/1.1 200 OK
  Content-Type: application/json; charset=UTF-8
  Content-Length: 14
  X-Openstack-Request-Id: req-req-2599f890-6986-435b-b23e-abafcd2b85ae
  Date: Mon, 16 Mar 2015 15:21:46 GMT

  {"images": []}

  2) And 
  [root@node191 glance]# 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: 2e65fd85f8eb41e2a33ed5b401754798' http://10.104.0.191:9292/v1/images/detail?deleted=True
  Will also list all the Active images without any deleted images. 

  It does appears that glance will never allow the filters with 'deleted' key passing from the check below.
  https://github.com/openstack/glance/blob/master/glance/api/v1/images.py#L387

  And in registry code will never get filter with 'deleted', so 'deleted' will always being false.
  https://github.com/openstack/glance/blob/master/glance/registry/api/v1/images.py#L249

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1432701/+subscriptions


Follow ups

References