Bug #63395
openRGW cloud sync doesn't work properly in the multi-tenancy scenario
0%
Description
At the moment, we cannot set buckets prefixed with tenant 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 using `bucket.name` in the profiles configured, and it ignores `bucket.tenant`. See this `main` branch code as of today:
https://github.com/ceph/ceph/blob/ddd2c61077c566964f6b0aa4835396740fe9c9b3/src/rgw/driver/rados/rgw_sync_module_aws.cc#L489-L490
This is problematic in the RGW multi-tenancy scenario:
https://docs.ceph.com/en/latest/radosgw/multitenancy/#rgw-multi-tenancy
At the moment, we only can configure bucket name in the profile `source_bucket` field. In the multi-tenancy scenario, this would sync all the buckets (from all the tenants) that have the name configured in the `source_bucket`.
For example, we cannot do this:
- `tenantA/test-bucket` -> S3 target A
- `tenantB/test-bucket` -> S3 target B
- `tenantC/test-bucket` -> S3 target C
The idea would be to be able to do this:
- `tenantA/*` -> S3 target A
- `tenantB/*` -> S3 target B
- `tenantC/*` -> S3 target C
We can only do this at the moment:
- `test-bucket` -> S3 target A
This syncs all the buckets named `test-bucket` from all the tenants to the same S3 target. We cannot have `test-bucket`, from separate tenants, to different S3 targets.