From: Jason Dillaman Date: Thu, 3 Oct 2019 21:47:28 +0000 (-0400) Subject: rbd-mirror: don't report an error when the bootstrap is canceled X-Git-Tag: v15.1.0~1245^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a679320b46d0fbd76d3f6a109c29484a45b1fe15;p=ceph.git rbd-mirror: don't report an error when the bootstrap is canceled The policy might redirect images to another mirror daemon, so avoid recording a image status error when shutting down. Signed-off-by: Jason Dillaman --- diff --git a/src/tools/rbd_mirror/ImageReplayer.cc b/src/tools/rbd_mirror/ImageReplayer.cc index b4b1fb649afa..8dbdad0fbbaa 100644 --- a/src/tools/rbd_mirror/ImageReplayer.cc +++ b/src/tools/rbd_mirror/ImageReplayer.cc @@ -1418,7 +1418,7 @@ void ImageReplayer::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;