Repository navigation
rgw: support If-Match and If-None-Match on the CopyObject destination - #71588
Conversation
There was a problem hiding this comment.
Not specific to this PR -
the spec says "If a concurrent operation occurs during the upload S3 returns a 409 ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag and retry the upload."
Maybe there should be additional checks to validate these checks post Write/copy operation too.
Agreed, but that's a PutObject-wide gap rather than something this PR adds, since the copy shares the same head write. The race is already caught at commit on unversioned buckets, it just surfaces as a 500 instead of a 409. |
soumyakoduri
left a comment
There was a problem hiding this comment.
Overall looks good to me.
b4f00f2 to
c1ea544
Compare
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
1 similar comment
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
c1ea544 to
f6e5d38
Compare
This error is added and being handled for ConditionalDelete as part of #72100. It should be addressed for ConditionalCopy too (may be as follow-up if required) |
@soumyakoduri wouldn't the follow up to #72100, #72109 resolve the ConditionalCopy concerns? |
f6e5d38 to
044316f
Compare
|
@cbodley @AliMasarweh could one of you please review this? |
| +--------------------------------------+-------------------------------------------------+------------------------+------------+ | ||
| | **If-Match** | Copies only if the destination ETag matches. | Entity Tag | No | | ||
| +--------------------------------------+-------------------------------------------------+------------------------+------------+ | ||
| | **If-None-Match** | Copies only if the destination does not exist. | ``*`` | No | |
There was a problem hiding this comment.
I think that If-None-Match can accept an Entity Tag same as a wild card (i.e. "*")
There was a problem hiding this comment.
Yup, added. thanks for pointing that out!
|
@AliMasarweh Thank you for reviewing this pull request! As a member of the Ceph organization, please add yourself to |
54d7e2f to
3f0a65f
Compare
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
Add If-Match and If-None-Match destination conditions to CopyObject. Copies with these headers to a remote zonegroup, through the D4N write cache, or on the POSIX and DBStore drivers return 501. Fixes: https://tracker.ceph.com/issues/79570 Signed-off-by: Matthew N. Heler <[email protected]>
Add tests for the If-Match and If-None-Match destination headers on CopyObject. New tests: - test_copy_object_dest_if_match: 404 on a missing destination, 412 on a mismatch, success on a match - test_copy_object_dest_if_none_match: create-only copy succeeds on a missing destination, 412 when it exists Signed-off-by: Matthew N. Heler <[email protected]>
Add an XXX note and a log line where CopyObject rejects destination If-Match and If-None-Match: under the D4N write cache, when the destination bucket is in a remote zonegroup, and on the POSIX driver. The 501 is now visible in the log and these gaps are easy to find later. Signed-off-by: Matthew N. Heler <[email protected]>
3f0a65f to
9963bbc
Compare
|
This PR has been added to wip-anrao10-testing-2026-11-02-0708-main. |
pr testing completed and approved by @ivancich, more deatils in : https://tracker.ceph.com/issues/82524. |
Apply the If-Match and If-None-Match request headers to the destination object on CopyObject, reusing PutObject's precondition checks. Conditional copies to a remote destination or through D4N write-back return 501.
Fixes: https://tracker.ceph.com/issues/79570
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 DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.