]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: remove zonegroup self-comparison
authorCasey Bodley <cbodley@redhat.com>
Tue, 4 Dec 2018 21:18:12 +0000 (16:18 -0500)
committerCasey Bodley <cbodley@redhat.com>
Wed, 5 Dec 2018 16:46:32 +0000 (11:46 -0500)
get_zonegroup() here is equivalent to *zonegroup

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/services/svc_zone.cc

index 2e1e67706808ee62627c9ba93c36025b72d822d7..2dc123262dd88b3b9acd94a82835b5410c6baae6 100644 (file)
@@ -1013,16 +1013,9 @@ int RGWSI_Zone::select_bucket_location_by_rule(const string& location_rule, RGWZ
   map<string, RGWZonePlacementInfo>::iterator piter = get_zone_params().placement_pools.find(location_rule);
   if (piter == get_zone_params().placement_pools.end()) {
     /* couldn't find, means we cannot really place data for this bucket in this zone */
-    if (get_zonegroup().equals(zonegroup->get_id())) {
-      /* that's a configuration error, zone should have that rule, as we're within the requested
-       * zonegroup */
-      ldout(cct, 0) << "ERROR: This zone does not contain placement rule"
-                    << location_rule << " present in the zonegroup!" << dendl;
-      return -EINVAL;
-    } else {
-      /* oh, well, data is not going to be placed here, bucket object is just a placeholder */
-      return 0;
-    }
+    ldout(cct, 0) << "ERROR: This zone does not contain placement rule "
+                  << location_rule << " present in the zonegroup!" << dendl;
+    return -EINVAL;
   }
 
   RGWZonePlacementInfo& placement_info = piter->second;