]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: PutObjectLockConfiguration can enable object lock on existing buckets 62063/head
authorCasey Bodley <cbodley@redhat.com>
Thu, 20 Feb 2025 19:42:37 +0000 (14:42 -0500)
committerCasey Bodley <cbodley@redhat.com>
Mon, 10 Mar 2025 16:05:21 +0000 (12:05 -0400)
commitf7b390c324f89633c4342cc0494fe87bf8f77a6f
treecf8e6b3e5858304cb9f4e38e0ee98cf8861bf9d7
parent55fb540837d22e72fc90027247a9af1da1e21cf3
rgw: PutObjectLockConfiguration can enable object lock on existing buckets

AWS now allows PutObjectLockConfiguration on existing buckets, even if
x-amz-bucket-object-lock-enabled was not specified on bucket creation

object lock still requires the bucket to be versioning-enabled, so such
requests are rejected otherwise. if the bucket is versioning-enabled but
not object-lock-enabled, enable the BUCKET_OBJ_LOCK_ENABLED flag

this logic was moved into retry_raced_bucket_write() in case the request
races with PutBucketVersioning

Fixes: https://tracker.ceph.com/issues/70013
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit b454668983fe45687f9f77c75628a4d641dd545b)

Conflicts:
src/rgw/rgw_op.cc put_info() doesn't take optional_yield
PendingReleaseNotes
src/rgw/rgw_op.cc