From: Adam Wolfe Gordon Date: Thu, 10 Aug 2017 19:31:38 +0000 (-0400) Subject: rbd-mirror: Set the data pool correctly when creating images X-Git-Tag: v12.2.0~55^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dffaac83d19de544e279a530393b3998f1e1fbb4;p=ceph.git rbd-mirror: Set the data pool correctly when creating images Previously the data-pool option was ignored by rbd-mirror, so when using erasure coding data for the image on the secondary site would end up in the metadata pool. Configure the data-pool using the data-pool's name from the primary site when creating images on the secondary site. Fixes: http://tracker.ceph.com/issues/20567 Signed-off-by: Adam Wolfe Gordon --- diff --git a/src/tools/rbd_mirror/image_replayer/CreateImageRequest.cc b/src/tools/rbd_mirror/image_replayer/CreateImageRequest.cc index 5db89b4d1cc39..acef392b1a4ea 100644 --- a/src/tools/rbd_mirror/image_replayer/CreateImageRequest.cc +++ b/src/tools/rbd_mirror/image_replayer/CreateImageRequest.cc @@ -74,6 +74,8 @@ void CreateImageRequest::create_image() { m_remote_image_ctx->stripe_unit); image_options.set(RBD_IMAGE_OPTION_STRIPE_COUNT, m_remote_image_ctx->stripe_count); + image_options.set(RBD_IMAGE_OPTION_DATA_POOL, + m_remote_image_ctx->data_ctx.get_pool_name()); librbd::image::CreateRequest *req = librbd::image::CreateRequest::create( m_local_io_ctx, m_local_image_name, m_local_image_id,