]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: use explicit index pool placement 20565/head
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 7 Feb 2018 21:23:36 +0000 (13:23 -0800)
committerAbhishek Lekshmanan <abhishek@suse.com>
Fri, 23 Feb 2018 14:54:46 +0000 (15:54 +0100)
Fixes: http://tracker.ceph.com/issues/22928
If explicit placement is set, it overrides placement_target.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit 5f32134f6d6bafa2ee6c948804a66cbe310b7876)

src/rgw/rgw_rados.cc

index 460029be925414fd0b65fbd40729ca78ddaae47a..9b94d53d0cdac5ffe00432a14e372bafa992a524 100644 (file)
@@ -4861,6 +4861,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;