Repository navigation
RGW | fix conditional Delete, MultiDelete and Put - #63348
Conversation
|
looking for could you please add test cases for put_object() and complete_multipart_upload() that covers both etag values and the * wildcard? |
sure, @mattbenjamin said that there are more cases that need fix such as: |
1bb3047 to
c8292fd
Compare
e24ca5a to
9d3a326
Compare
9d3a326 to
4e1133e
Compare
6234330 to
0627bf2
Compare
02498a1 to
186325b
Compare
186325b to
be9ec82
Compare
|
I think the issue in conditional put with versioned bucket, is this block of code in RGWRados::get_obj_state_impl: we return from this function and the object doesn't have an etag in attrs why are we expecting an attrs here? |
|
I think the issue is that there are two objects in question here. The unversioned object, and the versioned object. That sequence you posted does load the state (and so the attributes) of the versioned object, but it doesn't do anything to the unversioned object. Where is this being called from? |
|
the subject says "fix conditional write" but is this PR going to address DeleteObject only? |
#60957 reported a similar issue here, but the fix wasn't passing tests :( edit: i think that was specific to multipart uploads though |
@AliMasarweh what are you expecting conditional put to do in a versioned bucket? with versioning enabled, writes create a new object version instead of overwriting an existing one. so If-Match would not find an existing etag for comparison edit: maybe i'm mistaken, https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-writes.html#conditional-error-response talks about interactions with versioning enabled/suspended |
a2fda74 to
d3a37b2
Compare
size_match supports size 0 checks_preconditions checks for last_modified and size as well supports versioned object Signed-off-by: Ali Masarwa <[email protected]>
d3a37b2 to
0f5e85c
Compare
|
do we have a stable commit on main that I should rebase on my code, teuthology has too many valgrind error: |
mattbenjamin
left a comment
There was a problem hiding this comment.
appreciate the cleanup, new change backported with only the async dispatch conflict, seems to have passed downstream QA; thank you!
|
qa/rgw/s3tests-branch.yaml modification should be cleaned up as well |
Signed-off-by: Ali Masarwa <[email protected]>
0f5e85c to
b99a47f
Compare
|
jenkins test make check arm64 |
|
This PR appears to have caused some significant breakage:
A new error regarding orphan list showed up during the teuthology run that indicated a regression: I bisected the orphan list failure to commit 55f5b76 , which is one of the two commits in this PR. |
|
Do you have any plans to backport this to squid? |
The tracker does not list any backports, and we try to record backports there. But @AliMasarweh may know differently.... |
thanks @cupnes, i updated https://tracker.ceph.com/issues/68183 to request squid and tentacle backports |
The previous commit explained the ETag stripping in terms of one vendor's storage, which reads like a local workaround. It is the opposite, and the comment now carries the citations to show it. The quoted form is the one that is not portable. Ceph compared the raw If-Match header against the stored tag without unquoting it first, fixed in ceph/ceph#63348 (merged to main 2025-07-28). The tentacle backport ceph/ceph#65949 merged 2026-02-19, after v20.2.0 was cut, and the squid backport ceph/ceph#65932 is still open, so every v19.x and v20.2.0 deployment refuses a quoted conditional write today. The unquoted form works on those, works on the fixed releases, and works on MinIO, SeaweedFS and versitygw, which compare with the quotes off on both sides. Stripping also stays correct once the fix is everywhere, because taking the quotes off a bare tag does nothing, so this does not become dead weight later. The strongest argument is that Ceph's own compliance suite agrees: s3-tests strips the quotes before setting If-Match on PutObject in test_put_object_ifmatch_good. Their newer test_put_object_if_match passes the quoted tag straight through, so once the fix has landed both spellings are expected to work and only one of them works before it. How sure we are, stated plainly, because it is not all the same strength. Measured first hand: everything in the table in the comment, against Hetzner Object Storage, including the control line showing a wrong tag is still refused. Verified from source: the Ceph pull requests and their merge state, and the s3-tests assertions. Strong but not a documented guarantee: that Amazon S3 accepts the unquoted form. AWS documents and demonstrates the quoted form, and nowhere promises to take a bare tag; the evidence that it does is that terraform-provider-aws sends stripped ETags as If-Match against real AWS at scale, plus an unquoted value in AWS's own CLI example. Nobody here has an Amazon account to close that last gap. If takeovers ever stop working against Amazon, this function is the first place to look. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GduFdCXxotpmtrncHrMTup
|
@AliMasarweh @cbodley After this change, We are testing Ceph RGW for ClickHouse content-addressed storage (Altinity Antalya builds) and this is one of roadblocks along with unconditional PutObject while DeleteObject on the same key runs (but another issues were fixed by this pull request, thank you!). |
No it wasn't intentional, it should be fixed in an ongoing PR |
https://tracker.ceph.com/issues/68183
https://bugzilla.redhat.com/show_bug.cgi?id=2350732
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job Definition