From: Yehuda Sadeh Date: Wed, 16 Jan 2019 03:31:18 +0000 (-0800) Subject: rgw: check if default placement target is set correctly X-Git-Tag: v14.1.0~314^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d9dd67c5b7b0c5cc37e4532163dc1d1e98f777a9;p=ceph.git rgw: check if default placement target is set correctly 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 --- diff --git a/src/rgw/services/svc_zone.cc b/src/rgw/services/svc_zone.cc index d8368fb7c2f6..a13583763e55 100644 --- a/src/rgw/services/svc_zone.cc +++ b/src/rgw/services/svc_zone.cc @@ -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()) {