Because there is not a default realm, the has_zonegroup_api always returns false
when create bucket with the BucketLocation parameter under default zonegroup,
which always leads to the CreateBucket with BucketLocation parameter request failed.
Fixes: https://tracker.ceph.com/issues/41401
Signed-off-by: Enming Zhang <enming.zhang@umcloud.com>
(cherry picked from commit
18115915fa861a4b32e8d442266e90e9589215f7)
const auto& zonegroups_by_api = current_period.get_map().zonegroups_by_api;
if (zonegroups_by_api.find(api) != zonegroups_by_api.end())
return true;
+ } else if (zonegroup.api_name == api) {
+ return true;
}
return false;
}