yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #24204
[Bug 1387311] [NEW] Unprocessable Entity error for large images on Ceph Swift store
Public bug reported:
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://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
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://github.com/openstack/glance_store/blob/master/glance_store/_drivers/swift/store.py#L552
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
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/1387311
Title:
Unprocessable Entity error for large images on Ceph Swift store
Status in OpenStack Image Registry and Delivery Service (Glance):
New
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://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
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://github.com/openstack/glance_store/blob/master/glance_store/_drivers/swift/store.py#L552
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1387311/+subscriptions
Follow ups
References