From d9dd67c5b7b0c5cc37e4532163dc1d1e98f777a9 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Tue, 15 Jan 2019 19:31:18 -0800 Subject: [PATCH] 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 --- src/rgw/services/svc_zone.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/services/svc_zone.cc b/src/rgw/services/svc_zone.cc index d8368fb7c2f..a13583763e5 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()) { -- 2.47.3