Checksum not populated when using swift backend

Bug #1095356 reported by Robert van Leeuwen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Invalid
Undecided
Unassigned

Bug Description

When using glance with a swift backend the checksum is not populated when adding an image and the size of the image is below the swift_store_large_object_size.

This results in an error message when downloading the image, e.g.:
[Errno 32] Corrupt image download. Checksum was 50bdc35edb03a38d91b1b071afb20a3c expected

Looking at the glance/store/swift.py code it seems to me the checksum code is only hit when the size is above swift_store_large_object_size.

Revision history for this message
Iccha Sethi (iccha-sethi) wrote :

290 if image_size > 0 and image_size < self.large_object_size:
291 # Image size is known, and is less than large_object_size.
292 # Send to Swift with regular PUT.
293 obj_etag = connection.put_object(location.container,
294 location.obj, image_file,
295 content_length=image_size)

I think the obj_etag here is the checksum returned from swift

Revision history for this message
Brian Waldon (bcwaldon) wrote :

As iccha pointed out, we expect the checksum to be returned by a call to swiftclient.Connection.put_object and we store it in the variable obj_etag, which is then returned from the store driver. What version of python-swiftclient are you using?

Changed in glance:
status: New → Incomplete
Revision history for this message
Robert van Leeuwen (rovanleeuwen) wrote :

I am using python-swiftclient-1.2.0-2.el6.noarch which comes from the EPEL repository.
Which seems to be the latest release.

Good to know that the issue is not in the glance code but somewhere in the swift part.
I'll dig into this a bit more today, will let you know what I find out.

Revision history for this message
Robert van Leeuwen (rovanleeuwen) wrote :

Ok, found the issue:
The loadbalancer is stripping the etag from the header so it is not related to the Openstack codebase.

Thx for helping me out.

Changed in glance:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.