]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rbd-mirror: propagate deletion only if remote image doesn't exist
authorJason Dillaman <dillaman@redhat.com>
Tue, 19 Dec 2017 14:22:30 +0000 (09:22 -0500)
committerJason Dillaman <dillaman@redhat.com>
Tue, 19 Dec 2017 14:22:30 +0000 (09:22 -0500)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/tools/rbd_mirror/ImageReplayer.cc

index af5d4ff47f30714e73a26a5acbe23e981c4fc18f..6da6639b0be2c1261e382ed798f319bafb566b85 100644 (file)
@@ -454,7 +454,7 @@ void ImageReplayer<I>::handle_prepare_remote_image(int r) {
     dout(20) << "remote image does not exist" << dendl;
 
     // TODO need to support multiple remote images
-    if (!m_local_image_id.empty() &&
+    if (m_remote_image.image_id.empty() && !m_local_image_id.empty() &&
         m_local_image_tag_owner == m_remote_image.mirror_uuid) {
       // local image exists and is non-primary and linked to the missing
       // remote image