]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd-mirror: image replay should retry asok registration upon failure 26523/head
authorJason Dillaman <dillaman@redhat.com>
Sat, 23 Feb 2019 00:25:44 +0000 (19:25 -0500)
committerJason Dillaman <dillaman@redhat.com>
Mon, 25 Feb 2019 19:22:25 +0000 (14:22 -0500)
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 <dillaman@redhat.com>
src/tools/rbd_mirror/ImageReplayer.cc

index d1c00af989b449b327a3e8b2230d7499aa349de4..42cfec7ca54ffc7260f382a6df6e385ac8fc6bb6 100644 (file)
@@ -1870,7 +1870,7 @@ void ImageReplayer<I>::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;