]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: check if default placement target is set correctly
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 16 Jan 2019 03:31:18 +0000 (19:31 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Wed, 16 Jan 2019 03:31:18 +0000 (19:31 -0800)
Don't check if rule is empty. Rule might consist of non empty
storage class, but in this case we only care about the placement
id.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/services/svc_zone.cc

index d8368fb7c2f69c93471d1344dca594ff44e85b04..a13583763e55263ac999408d77c873e2693a34ef 100644 (file)
@@ -967,7 +967,7 @@ int RGWSI_Zone::select_new_bucket_location(const RGWUserInfo& user_info, const s
                     << " within zonegroup " << dendl;
       return -ERR_INVALID_LOCATION_CONSTRAINT;
     }
-  } else if (!user_info.default_placement.empty()) {
+  } else if (!user_info.default_placement.name.empty()) {
     used_rule = &user_info.default_placement;
     titer = zonegroup.placement_targets.find(user_info.default_placement.name);
     if (titer == zonegroup.placement_targets.end()) {