]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd-mirror: don't report an error when the bootstrap is canceled
authorJason Dillaman <dillaman@redhat.com>
Thu, 3 Oct 2019 21:47:28 +0000 (17:47 -0400)
committerJason Dillaman <dillaman@redhat.com>
Tue, 8 Oct 2019 15:17:15 +0000 (11:17 -0400)
The policy might redirect images to another mirror daemon, so avoid
recording a image status error when shutting down.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/tools/rbd_mirror/ImageReplayer.cc

index b4b1fb649afa0ef656b1003e9d6cba05e6d025f9..8dbdad0fbbaaa0fa686ef38f22b7ef0c52af6f3d 100644 (file)
@@ -1418,7 +1418,7 @@ void ImageReplayer<I>::set_mirror_image_status_update(
       status.state = cls::rbd::MIRROR_IMAGE_STATUS_STATE_UNKNOWN;
       status.description = state_desc;
       mirror_image_status_state = status.state;
-    } else if (last_r < 0) {
+    } else if (last_r < 0 && last_r != -ECANCELED) {
       status.state = cls::rbd::MIRROR_IMAGE_STATUS_STATE_ERROR;
       status.description = state_desc;
       mirror_image_status_state = status.state;