dfcd0dd7c4
When using ImagePollster to poll image status from Glance, there might be duplicate image status event recorded down if there are private images together with public images stored in Glance. In Glance, the get image list API looks like: def _get_images(self, context, filters, **params): ... # NOTE(markwash): for backwards compatibility, is_public=True for # admins actually means "treat me as if I'm not an admin and show # all my images" if context.is_admin and params.get('is_public') is True: context.is_admin = False del params['is_public'] ... The above code shows that if a user is of 'admin_role'(this option is configured in the glance-api.conf) and querying for public images, Glance will return all the public images together with the private ones While in ceilometer/image/glance.py#_Base.iter_images method, ceilometer get the image list by querying public and private images respectively and then chain the result lists together. This causes the duplication of image in the image list. This fix changes the code in ImagePollster.get_counters method to filter out the duplicate images based on their image id. Change-Id: Ib5e213161043033c20195efc0c6e7edd78982bd6 Fixes: Bug 1180630 |
||
---|---|---|
.. | ||
__init__.py | ||
test_glance.py | ||
test_notifications.py |