Skip to content

Commit

Permalink
rgw multisite: preserve zone's extra pool
Browse files Browse the repository at this point in the history
In current multisite scenarios,if a bucket is created in master, we end
up storing multipart metadata in `$source-zone.rgw.buckets.non-ec` pool
instead of the zone's own non-ec pool, so we end up additionally
creating this pool and storing multipart metadata entries in it. Also if
a bucket is created in a secondary zone, and we initiate a multipart
upload, before mdlog sync with master, we end up getting errors during
complete multipart requests as omap entries are partly stored in the
`$zone.rgw.buckets.non-ec` as well as `$source-zone.rgw.buckets.non-ec`
pools which leads to total number of parts mismatch.

Fixes: http://tracker.ceph.com/issues/16712

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
(cherry picked from commit d4ecc95)
  • Loading branch information
theanalyst committed Aug 2, 2016
1 parent 894a5f8 commit e825dd2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/rgw/rgw_bucket.cc
Expand Up @@ -1905,11 +1905,13 @@ class RGWBucketInstanceMetadataHandler : public RGWMetadataHandler {
}
bci.info.bucket.data_pool = bucket.data_pool;
bci.info.bucket.index_pool = bucket.index_pool;
bci.info.bucket.data_extra_pool = bucket.data_extra_pool;
bci.info.index_type = rule_info.index_type;
} else {
/* existing bucket, keep its placement pools */
bci.info.bucket.data_pool = old_bci.info.bucket.data_pool;
bci.info.bucket.index_pool = old_bci.info.bucket.index_pool;
bci.info.bucket.data_extra_pool = old_bci.info.bucket.data_extra_pool;
bci.info.index_type = old_bci.info.index_type;
}

Expand Down

0 comments on commit e825dd2

Please sign in to comment.