]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix issue for CreateBucket with BucketLocation param under default zonegroup
authorEnming Zhang <enming.zhang@umcloud.com>
Wed, 30 May 2018 02:54:42 +0000 (10:54 +0800)
committerMatt Benjamin <mbenjamin@redhat.com>
Thu, 22 Aug 2019 20:31:18 +0000 (16:31 -0400)
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)

src/rgw/rgw_rados.h

index f19e10d39519e169cd79759666f4bff95b1beadd..89e982f52ac21eb5374d3fbad4100526f0a13a7e 100644 (file)
@@ -2499,6 +2499,8 @@ public:
       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;
   }