]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw/sync-policy: Support disabling per-bucket replication 49803/head
authorSoumya Koduri <skoduri@redhat.com>
Fri, 20 Jan 2023 10:33:15 +0000 (16:03 +0530)
committerSoumya Koduri <skoduri@redhat.com>
Mon, 3 Apr 2023 14:14:57 +0000 (19:44 +0530)
commitaeb3a746180675bc5fcfaea4af839daadb0abdd7
treee637575be9d78544d5e6d505d0cc958d92c3c533
parent66552a560f8f993d9dd2f5994333051b1467ea4c
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>
src/rgw/driver/rados/rgw_bucket_sync.cc
src/rgw/driver/rados/rgw_bucket_sync.h