]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: fix cloud-sync multi-tenancy scenario 54299/head
authorIonut Balutoiu <ibalutoiu@cloudbasesolutions.com>
Wed, 1 Nov 2023 16:07:58 +0000 (18:07 +0200)
committerIonut Balutoiu <ibalutoiu@cloudbasesolutions.com>
Thu, 2 Nov 2023 01:43:04 +0000 (03:43 +0200)
commit764da1be698e4a88f4afa74c5cdf9fcfbbc18f9b
tree62249ea455da9b62232844e0c82af1e151b25369
parentddd2c61077c566964f6b0aa4835396740fe9c9b3
rgw: fix cloud-sync multi-tenancy scenario

At the moment, we cannot set buckets prefixed with tenant ID in the
`source_bucket` field from cloud-sync profiles (non-trivial config):
https://docs.ceph.com/en/latest/radosgw/cloud-sync-module/#non-trivial-configuration

This is because the `do_find_profile` function only searches in the
profiles configured using `bucket.name`, and it ignores `bucket.tenant`.

This is problematic in the RGW multi-tenancy scenario:
https://docs.ceph.com/en/latest/radosgw/multitenancy/#rgw-multi-tenancy

At the moment, we can only configure bucket name in the profile
`source_bucket` field. In the multi-tenancy scenario, this would sync
all the buckets (from all the tenants).

Without this fix, we cannot configure a cloud-sync profile that syncs
all the buckets from a tenant to a particular S3 target.

For example, we cannot do this:

* `tenantA/test-bucket` -> S3 target A
* `tenantB/test-bucket` -> S3 target B
* `tenantC/test-bucket` -> S3 target C

We can only do this at the moment:

* `test-bucket` -> S3 target A

If `test-bucket` is present in both `tenantA` and `tenantB`, both
buckets will be synced to S3 target A.

The idea would be to be able to do this:

* `tenantA/*` -> S3 target A
* `tenantB/*` -> S3 target B
* `tenantC/*` -> S3 target C

If `test-bucket` is present in all tenants, each tenant bucket is
synced to its own S3 target.

Fixes: https://tracker.ceph.com/issues/63395
Signed-off-by: Ionut Balutoiu <ibalutoiu@cloudbasesolutions.com>
src/rgw/driver/rados/rgw_sync_module_aws.cc
src/rgw/rgw_bucket_types.h