From: Jason Dillaman Date: Sat, 23 Feb 2019 00:25:44 +0000 (-0500) Subject: rbd-mirror: image replay should retry asok registration upon failure X-Git-Tag: v14.1.1~114^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F26523%2Fhead;p=ceph.git rbd-mirror: image replay should retry asok registration upon failure If the asok registration fails (perhaps due to a race condition with a deleted and recreated image of the same name), periodically attempt to register the missing asok hook. Signed-off-by: Jason Dillaman --- diff --git a/src/tools/rbd_mirror/ImageReplayer.cc b/src/tools/rbd_mirror/ImageReplayer.cc index d1c00af989b4..42cfec7ca54f 100644 --- a/src/tools/rbd_mirror/ImageReplayer.cc +++ b/src/tools/rbd_mirror/ImageReplayer.cc @@ -1870,7 +1870,7 @@ void ImageReplayer::reregister_admin_socket_hook() { { Mutex::Locker locker(m_lock); auto name = m_local_ioctx->get_pool_name() + "/" + m_local_image_name; - if (m_name == name) { + if (m_asok_hook != nullptr && m_name == name) { return; } m_name = name;