From 07e4b72680da85f1b69d49c13389af3ca62e0aa0 Mon Sep 17 00:00:00 2001 From: Adam Wolfe Gordon Date: Thu, 10 Aug 2017 15:31:38 -0400 Subject: [PATCH] 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 (cherry picked from commit dffaac83d19de544e279a530393b3998f1e1fbb4) --- src/tools/rbd_mirror/image_replayer/CreateImageRequest.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tools/rbd_mirror/image_replayer/CreateImageRequest.cc b/src/tools/rbd_mirror/image_replayer/CreateImageRequest.cc index 5db89b4d1cc..acef392b1a4 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,