]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
rgw/sync-policy: Support disabling per-bucket replication
authorSoumya Koduri <skoduri@redhat.com>
Fri, 20 Jan 2023 10:33:15 +0000 (16:03 +0530)
committerSoumya Koduri <skoduri@redhat.com>
Wed, 24 May 2023 07:29:34 +0000 (12:59 +0530)
commit587910cfeef8249202a8f286de02f8c17748becd
tree6bf7bf6cdaf63b967b3953f81abfc39dd7348494
parent25ca69b29449e79ef45e41e653e1bd0921cf7333
rgw/sync-policy: Support disabling per-bucket replication

When the zones replicate, allow disabling replication
for specific buckets using sync policy.

These are the semantics to be followed while resolving the policy
conflicts -

==================================================
zonegroup bucket Result
==================================================
enabled enabled enabled
allowed enabled
forbidden disabled
allowed enabled enabled
allowed disabled
forbidden disabled
forbidden enabled disabled
allowed disabled
forbidden disabled

In case multiple group policies are set to reflect for any sync pair
(<source-zone,source-bucket>, <dest-zone,dest-bucket>), the following
rules are applied in the order -
1) Even if one policy status is FORBIDDEN, the sync will be disabled
2) Atleast one policy should be ENABLED for the sync to be allowed.

Various cases tested are outlined here -
https://docs.google.com/document/d/19oBQA-bYxLBR4BnekA2DTwJJaTFvjAfrqAk9G3RGU0I/edit#heading=h.4qac9dpc76m

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
(cherry picked from commit aeb3a746180675bc5fcfaea4af839daadb0abdd7)
src/rgw/driver/rados/rgw_bucket_sync.cc
src/rgw/driver/rados/rgw_bucket_sync.h