]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd-mirror: image replay should retry asok registration upon failure 28151/head
authorJason Dillaman <dillaman@redhat.com>
Sat, 23 Feb 2019 00:25:44 +0000 (19:25 -0500)
committerJason Dillaman <dillaman@redhat.com>
Thu, 16 May 2019 13:43:11 +0000 (09:43 -0400)
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>
(cherry picked from commit 2d2d3bbc791e807bb0c83072aaeee023116884ce)

src/tools/rbd_mirror/ImageReplayer.cc

index cd43c080ce134fdf127a8783aac773ae80bb7209..6e9c7a7c84bff6f6e4c80185c016a4dd019df51a 100644 (file)
@@ -1817,7 +1817,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;