From: Jason Dillaman Date: Thu, 27 Feb 2020 03:25:03 +0000 (-0500) Subject: rbd-mirror: do not re-register the ASOK if the image replayer isn't running X-Git-Tag: v15.1.1~153^2~13 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=bfc064e4cb0bde49e890a6275a9ac53f5dc1cd63;p=ceph-ci.git rbd-mirror: do not re-register the ASOK if the image replayer isn't running Avoid the possibility of a race when shutting down and post-unregister a status update causes the ASOK to become re-registered. Signed-off-by: Jason Dillaman --- diff --git a/src/tools/rbd_mirror/ImageReplayer.cc b/src/tools/rbd_mirror/ImageReplayer.cc index 6f6056e75ab..8068ef67871 100644 --- a/src/tools/rbd_mirror/ImageReplayer.cc +++ b/src/tools/rbd_mirror/ImageReplayer.cc @@ -1047,7 +1047,14 @@ void ImageReplayer::reregister_admin_socket_hook() { return; } + dout(15) << "old_image_spec=" << m_image_spec << ", " + << "new_image_spec=" << image_spec << dendl; m_image_spec = image_spec; + + if (m_state == STATE_STOPPING || m_state == STATE_STOPPED) { + // no need to re-register if stopping + return; + } locker.unlock(); unregister_admin_socket_hook();