Skip to content

rgw: fix conditional writes on versioning-suspended buckets - #71584

Merged
mheler merged 2 commits into
ceph:mainfrom
mheler:wip-rgw-suspended-conditional-write
Sep 23, 2026
Merged

mheler merged 2 commits into
ceph:mainfrom
mheler:wip-rgw-suspended-conditional-write

Conversation

@mheler

@mheler mheler commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Fixes: https://tracker.ceph.com/issues/80325

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 x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@mheler
mheler requested a review from a team as a code owner September 7, 2026 13:23
@mheler mheler changed the title rgw/rados: fix conditional writes on versioning-suspended buckets rgw: fix conditional writes on versioning-suspended buckets Sep 7, 2026
_do_write_meta only resolves the current version through the olh when
the write carries an instance, and writes on a versioning-suspended
bucket never do. Once a delete marker turns the head into an olh,
If-Match treats the olh head as an existing object and If-None-Match: *
fails with 412. Follow the olh whenever the head is one, and check
against an empty state when there is no current version.

Signed-off-by: Matthew N. Heler <[email protected]>
Add tests for the If-Match and If-None-Match preconditions against the
delete marker a delete leaves behind on a versioning-suspended bucket.

New tests:
- test_put_object_suspended_if_match: 404 on the deleted object, 412
  while the null version is still there
- test_multipart_put_object_suspended_if_none_match: create-only upload
  succeeds after the delete marker, 412 while the object exists

Signed-off-by: Matthew N. Heler <[email protected]>
@mheler
mheler force-pushed the wip-rgw-suspended-conditional-write branch from 55743a0 to 5ed7eaf Compare September 7, 2026 13:30
@cbodley
cbodley requested a review from AliMasarweh September 8, 2026 14:54

@AliMasarweh AliMasarweh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

bucket = get_new_bucket(client)
check_configure_versioning_retry(bucket, "Enabled", "Enabled")
check_configure_versioning_retry(bucket, "Suspended", "Suspended")
key = 'obj'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should also create an object and then delete it to recreate the described scenario

bucket = get_new_bucket(client)
check_configure_versioning_retry(bucket, "Enabled", "Enabled")
check_configure_versioning_retry(bucket, "Suspended", "Suspended")
key = 'obj'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

@anrao19

anrao19 commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to main integration testing by anuchaithra started 2026-09-17-04:59.

@anrao19

anrao19 commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to main integration testing by anuchaithra started 2026-09-17-04:59.

Testing completed and got approval from @ivancich, morr details in https://tracker.ceph.com/issues/80592).
@mheler , if no further testing is needed then this pr can be merged

@anrao19

anrao19 commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

jenkins test api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants