Public bug reported: When I tried to download an empty image file from glance with enabled cache management I got 500 error:
mfedosin@wdev:~$ glance --debug image-download 0af7b2e8-8e31-427b-a99f-9117f45418ef --file empty_file curl -g -i -X GET -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'User-Agent: python-glanceclient' -H 'Connection: keep-alive' -H 'X-Auth-Token: {SHA1}c91066a8c438769ed454eebd759b4f8b1e488cb6' -H 'Content-Type: application/octet-stream' http://10.0.2.15:9292/v2/images/0af7b2e8-8e31-427b-a99f-9117f45418ef/file Request returned failure status 500. Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/glanceclient/shell.py", line 605, in main args.func(client, args) File "/usr/local/lib/python2.7/dist-packages/glanceclient/v2/shell.py", line 277, in do_image_download body = gc.images.data(args.id) File "/usr/local/lib/python2.7/dist-packages/glanceclient/v2/images.py", line 194, in data resp, body = self.http_client.get(url) File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py", line 284, in get return self._request('GET', url, **kwargs) File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py", line 276, in _request resp, body_iter = self._handle_response(resp) File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py", line 93, in _handle_response raise exc.from_response(resp, resp.content) HTTPInternalServerError: HTTPInternalServerError (HTTP 500) HTTPInternalServerError (HTTP 500) Without cache management everything works fine. Steps to reproduce on devstack: 1. Set flavor to 'keystone+cachemanagement' in glance-api.conf (flavor = keystone+cachemanagement) 2. Restart glance-api server 3. Create an image with empty file (file size is 0) 4. Try to download the image file from glance. Expected result: new empty file will be created in local folder. Actual result: HTTPInternalServerError (HTTP 500) Logs from glance-api: http://paste.openstack.org/show/483545/ ** 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/1533150 Title: Downloading empty file with enabled cache management leads to 500 error Status in Glance: New Bug description: When I tried to download an empty image file from glance with enabled cache management I got 500 error: mfedosin@wdev:~$ glance --debug image-download 0af7b2e8-8e31-427b-a99f-9117f45418ef --file empty_file curl -g -i -X GET -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'User-Agent: python-glanceclient' -H 'Connection: keep-alive' -H 'X-Auth-Token: {SHA1}c91066a8c438769ed454eebd759b4f8b1e488cb6' -H 'Content-Type: application/octet-stream' http://10.0.2.15:9292/v2/images/0af7b2e8-8e31-427b-a99f-9117f45418ef/file Request returned failure status 500. Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/glanceclient/shell.py", line 605, in main args.func(client, args) File "/usr/local/lib/python2.7/dist-packages/glanceclient/v2/shell.py", line 277, in do_image_download body = gc.images.data(args.id) File "/usr/local/lib/python2.7/dist-packages/glanceclient/v2/images.py", line 194, in data resp, body = self.http_client.get(url) File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py", line 284, in get return self._request('GET', url, **kwargs) File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py", line 276, in _request resp, body_iter = self._handle_response(resp) File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py", line 93, in _handle_response raise exc.from_response(resp, resp.content) HTTPInternalServerError: HTTPInternalServerError (HTTP 500) HTTPInternalServerError (HTTP 500) Without cache management everything works fine. Steps to reproduce on devstack: 1. Set flavor to 'keystone+cachemanagement' in glance-api.conf (flavor = keystone+cachemanagement) 2. Restart glance-api server 3. Create an image with empty file (file size is 0) 4. Try to download the image file from glance. Expected result: new empty file will be created in local folder. Actual result: HTTPInternalServerError (HTTP 500) Logs from glance-api: http://paste.openstack.org/show/483545/ To manage notifications about this bug go to: https://bugs.launchpad.net/glance/+bug/1533150/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp