From 5f32134f6d6bafa2ee6c948804a66cbe310b7876 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Wed, 7 Feb 2018 13:23:36 -0800 Subject: [PATCH] rgw: use explicit index pool placement Fixes: http://tracker.ceph.com/issues/22928 If explicit placement is set, it overrides placement_target. Signed-off-by: Yehuda Sadeh --- src/rgw/rgw_rados.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 4c595fba8579..33e39bc34093 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -4881,6 +4881,12 @@ void RGWRados::build_bucket_index_marker(const string& shard_id_str, const strin int RGWRados::open_bucket_index_ctx(const RGWBucketInfo& bucket_info, librados::IoCtx& index_ctx) { + const rgw_pool& explicit_pool = bucket_info.bucket.explicit_placement.index_pool; + + if (!explicit_pool.empty()) { + return open_pool_ctx(explicit_pool, index_ctx); + } + const string *rule = &bucket_info.placement_rule; if (rule->empty()) { rule = &zonegroup.default_placement; -- 2.47.3