Red Hat Bugzilla – Bug 1013643
Glance download is not interrupted when the InputStream is closed
Last modified: 2016-02-10 13:54:02 EST
Description of problem:
It is impossible to abruptly close the InputStream used to download a glance image, in fact when close() is called the entire image is downloaded before shutting down the tcp connection.
This is a serious issue for applications such as rhevm-backend that are using the InputStream to inspect the QCOW2 header in order to discover the image virtual size.
Even more since resteasy (shipped in jboss) is using the SelfExpandingBufferredInputStream under the hood I also suspect that the entire image is not only downloaded but also cached in memory (leading to out of memory crashes).
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Import a large (>~2Gb) QCOW2 glance image from rhev webadmin (or rest api)
The entire image is downloaded (from the engine backend); the canDoAction validation takes a long time (inspecting the image virtual size).
Only the initial part of the image should be downloaded (resulting in a quick canDoAction and no memory usage).
This bug should be moved to openstack-java-sdk as soon as it will appear in the components list.
A fix has been proposed upstream:
The CanDoAction validation takes a short time (1 sec) when downloading a QCOW2 image (3G in size)
Verified on is27
Closing - RHEV 3.3 Released