Unprocessable Entity error for large images on Ceph Swift store
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
glance_store |
Invalid
|
Undecided
|
Unassigned |
Bug Description
There is an implementation difference between Ceph Swift and OS Swift in how the ETag/checksum of a dynamic large object (DLO) manifest object is verified.
OS Swift verifies it just like any other object, md5’ing the content of the object:
https:/
Ceph Swift actually does the full DLO checksum across all the component objects:
https:/
The Glance Swift store driver assumes the OS Swift behavior, and sends an ETag of md5("") with the PUT request for the manifest object. Technically, this is correct, since that object itself is a zero-byte object:
https:/
However, when using a Ceph Swift store, this results in a 422 Unprocessable Entity response from Swift, because the provided ETag doesn't match the expected ETag for the DLO.
It would seem to make sense to just not send any ETag with the manifest object PUT request. It is not required by the API, and only marginally improves the validation of the object.
affects: | glance → glance-store |
Hi Mike.
I see that omitting the etag on upload would make uploads work against Ceph's Swift.
However my preference would be to fix the Swift compatibility in Ceph -- that would work for all applications, not just Glance.
It would also ensure that gate tests etc which run against OpenStack Swift would be guaranteed to work with Ceph Swift as the backend. (Otherwise future bugs breaking compatability could be introduced.)