Comment 0 for bug 1257273

Revision history for this message
Flavio Percoco (flaper87) wrote :

Glance images are not being fetched by glance's API v1 when the size is 0. There are 2 things wrong with this behaviour:

1) Active images should always be ready to be downloaded, regardless they're locally or remotely stored.
2) The size shouldn't be the way to verify whether an image has some data or not.

431 if image_meta.get('size') == 0:
432 -> image_iterator = iter([])
433 else:
434 image_iterator, size = self._get_from_store(req.context,
435 image_meta['location'])
436 image_iterator = utils.cooperative_iter(image_iterator)
437 image_meta['size'] = size or image_meta['size']

This is happening in the API v1, but it doesn't seem to be true for v2.