Bug #9973
closedValidation of Swift DLO manifest object ETag doesn't match OpenStack Swift behavior
0%
Description
The way the RGW Swift API validates the ETag on DLO manifest objects does not match the way the OpenStack Swift implementation does. This results in inconsistent behavior between the OpenStack Swift and RGW Swift "compatible" APIs. If the client assumes the OS Swift behavior, and includes an ETag with the manifest object PUT request, it results in a 422 Unprocessable Entity error from RGW Swift.
Additional details in Glance bug https://bugs.launchpad.net/glance/+bug/1387311
OS Swift verifies it just like any other object, md5’ing the (empty) content of the object:
https://github.com/openstack/swift/blob/master/swift/obj/server.py#L439-L459
Ceph Swift actually does the full DLO checksum across all the component objects:
https://github.com/ceph/ceph/blob/master/src/rgw/rgw_op.cc#L1765-L1781
Fundamentally it comes down to the question: should manifest objects treated as a regular, zero-length, object; or treated specially as a DLO object? I am not sure with Swift API spec makes this clear, and you can make arguments either way whether OS or RGW is correct.
However, in the interest of compatibility with OS Swift, I would like to suggest this behavior be changed in the RGW implementation. I have also engaged the Glance community about removing the ETag from the manifest object PUT request (see the above bug), which fixes this for my specific situation with Glance backed on RGW Swift.
commit:ef6d3ad964d34bc526dc4435486bd5c8cdc3b230