Project

General

Profile

Actions

Bug #80325

closed
MH MH

rgw: conditional writes on a versioning-suspended bucket see the delete marker as the current object

Bug #80325: rgw: conditional writes on a versioning-suspended bucket see the delete marker as the current object

Added by Matthew Heler 3 months ago. Updated about 1 month ago.

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

0%

Source:
Backport:
umbrella, tentacle, squid
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v21.3.0-3562-g6483a25aed
Released In:
Upkeep Timestamp:
2026-10-21T01:42:03+00:00

Description

After deleting an object in a bucket with versioning suspended, RGW treats the remaining delete marker as an existing object when checking `If-Match` and `If-None-Match` on `PutObject` and `CompleteMultipartUpload`. This prevents create-only writes from recreating the object, while allowing `If-Match: *` writes to succeed even though the object is deleted. Unversioned buckets and buckets with versioning enabled behave correctly.

AWS documents [1] that when the current version is a delete marker, `If-None-Match: *` should succeed and `If-Match` should return `404 Not Found`. A DELETE with versioning suspended [2] leaves a delete marker with version ID `null`, so the same behavior should apply here.

To reproduce, create a bucket, enable versioning, then suspend it:

PUT obj
DELETE obj    -> delete marker with version ID null

HEAD obj      -> HTTP 404
ListObjectsV2 -> 0 keys

Run each conditional write independently against the deleted key, repeating the setup between tests:

PUT obj  If-None-Match: *
  Actual:   HTTP 412 PreconditionFailed
  Expected: HTTP 200

PUT obj  If-Match: *
  Actual:   succeeds
  Expected: HTTP 404 NoSuchKey

PUT obj  If-Match: "badetag" 
  Actual:   HTTP 412 PreconditionFailed
  Expected: HTTP 404 NoSuchKey

CompleteMultipartUpload  If-None-Match: *
  Actual:   HTTP 412 PreconditionFailed
  Expected: HTTP 200

[1] https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-writes.html
[2] https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeletingObjectsfromVersioningSuspendedBuckets.html


Related issues 4 (1 open — 3 closed)

Related to rgw - Bug #80925: rgw: conditional writes in a versioning-enabled bucket are not atomicFix Under ReviewKyle Bader

Actions
Copied to rgw - Backport #80787: tentacle: rgw: conditional writes on a versioning-suspended bucket see the delete marker as the current objectResolvedMatthew Heler

Actions
Copied to rgw - Backport #80788: squid: rgw: conditional writes on a versioning-suspended bucket see the delete marker as the current objectResolvedMatthew Heler

Actions
Copied to rgw - Backport #80789: umbrella: rgw: conditional writes on a versioning-suspended bucket see the delete marker as the current objectResolvedMatthew Heler

Actions

MH Updated by Matthew Heler 3 months ago Actions #1

  • Description updated (diff)

MH Updated by Matthew Heler 3 months ago Actions #2

  • Description updated (diff)

MH Updated by Matthew Heler 3 months ago Actions #3

  • Description updated (diff)

MH Updated by Matthew Heler 3 months ago Actions #4

  • Backport set to umbrella, tentacle, squid

MH Updated by Matthew Heler 3 months ago Actions #5

  • Pull request ID set to 71584

UB Updated by Upkeep Bot 2 months ago Actions #6

  • Copied to Backport #80787: tentacle: rgw: conditional writes on a versioning-suspended bucket see the delete marker as the current object added

UB Updated by Upkeep Bot 2 months ago Actions #7

  • Copied to Backport #80788: squid: rgw: conditional writes on a versioning-suspended bucket see the delete marker as the current object added

UB Updated by Upkeep Bot 2 months ago Actions #8

  • Copied to Backport #80789: umbrella: rgw: conditional writes on a versioning-suspended bucket see the delete marker as the current object added

UB Updated by Upkeep Bot 2 months ago Actions #9

  • Status changed from New to Backporting
  • Merge Commit set to 6483a25aed8fae310512af1dc1cb621842091ca5
  • Fixed In set to v21.3.0-3562-g6483a25aed
  • Upkeep Timestamp set to 2026-09-23T11:14:02+00:00

KB Updated by Kyle Bader 2 months ago Actions #10

  • Related to Bug #80925: rgw: conditional writes in a versioning-enabled bucket are not atomic added

UB Updated by Upkeep Bot about 1 month ago Actions #11

  • Status changed from Backporting to Resolved
  • Upkeep Timestamp changed from 2026-09-23T11:14:02+00:00 to 2026-10-21T01:42:03+00:00
Actions

Also available in: PDF Atom