I finally got around to investigating this today. tl;dr: there does not appear to be an issue here.
The return value of 'glanceclient.Client.images.data' is 'glanceclient.common.utils.RequestIdProxy', owing to the use of the 'add_req_id_to_object' decorator [2]. This is *not* a generator, which means the 'inspect.isgenerator' conditional at [1] is False and we will never convert these large images to a list. In fact, there appears to be only one case that does trigger this: the 'glanceclient.Client.images.list' case, which returns a 'glanceclient.common.utils.GeneratorProxy' object due to the use of the 'add_req_id_to_generator' decorator. This is the function at the root of bug #1557584. As such, the fix is correct and there's nothing to do here besides possibly documenting things better in the code. [1] https://github.com/openstack/nova/blob/16.0.0/nova/image/glance.py#L167 [2] https://github.com/openstack/python-glanceclient/blob/3.1.1/glanceclient/v2/images.py#L200 [3] https://github.com/openstack/python-glanceclient/blob/3.1.1/glanceclient/v2/images.py#L85 ** Changed in: nova Status: New => Invalid -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1736920 Title: Glance images are loaded into memory Status in OpenStack Compute (nova): Invalid Status in OpenStack Security Advisory: Incomplete Bug description: Nova appears to be loading entire responses from glance into memory [1]. This is generally not an issue but these responses could be an entire images [2]. Given a large enough image, this seems like a potential avenue for DoS, not to mention being highly inefficient. [1] https://github.com/openstack/nova/blob/16.0.0/nova/image/glance.py#L167-L170 [2] https://github.com/openstack/nova/blob/16.0.0/nova/image/glance.py#L292-L295 To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1736920/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

