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)