Project

General

Profile

Actions

Bug #9973

closed

Validation of Swift DLO manifest object ETag doesn't match OpenStack Swift behavior

Added by Mike Dorman over 9 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
firefly, giant
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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

Actions #1

Updated by Yehuda Sadeh over 9 years ago

  • Status changed from New to Fix Under Review
  • Assignee set to Josh Durgin
  • Backport set to firefly, giant
Actions #2

Updated by Josh Durgin over 9 years ago

  • Status changed from Fix Under Review to Pending Backport

commit:ef6d3ad964d34bc526dc4435486bd5c8cdc3b230

Actions #3

Updated by Josh Durgin over 9 years ago

  • Assignee changed from Josh Durgin to Yehuda Sadeh
Actions #4

Updated by Loïc Dachary about 9 years ago

  • Description updated (diff)

add the commit to the description so that it can easily be picked when scraping redmine

Actions #5

Updated by Loïc Dachary about 9 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF