]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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>
Fri, 21 Jun 2024 17:58:44 +0000 (23:28 +0530)
commitd7e9708132fce16b7269643647f41cf7780e2a3c
tree84e8b7a5929846b8adf76ee2b62c766fea7a6e87
parent11f58cd52d5d221eb22bf4dd164090ff87e8579c
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)
(cherry picked from commit 587910cfeef8249202a8f286de02f8c17748becd)
src/rgw/rgw_bucket_sync.cc
src/rgw/rgw_bucket_sync.h