Comment 8 for bug 1619675

Revision history for this message
Cyril Roelandt (cyril-roelandt) wrote :

OK, I can confirm this fails with a KeyError, as shown previously.

The Content-MD5 header is nowhere to be found, despite being set in download() in glance. One could change openstack/image/v2/image.py to work around the issue by doing:

- checksum = resp.headers["Content-MD5"]
+ checksum = self.checksum

in the download() function, but this is an ugly workaround I'm afraid.

I think it may not be an issue in Glance. Could you try to run a curl command that does the same thing as image.download(conn.image.session)? Something along the lines of:

export OS_TOKEN=...
export IMAGEID=...
curl -v -X GET \
        -H "X-Auth-Token: $OS_TOKEN" \
        http://10.0.2.15:9292/v2/images/$IMAGEID/file > /dev/null

I get "< Content-Md5: db0f920c8f85d215fe63a53693f31950" in the response.