]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: use explicit index pool placement
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 7 Feb 2018 21:23:36 +0000 (13:23 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Wed, 7 Feb 2018 21:24:06 +0000 (13:24 -0800)
Fixes: http://tracker.ceph.com/issues/22928
If explicit placement is set, it overrides placement_target.

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

index 4c595fba85799977bb4cecd3d37edde23a45b104..33e39bc340937291d5773cc88b7b73e8cafe61fd 100644 (file)
@@ -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;