]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd-mirror: image replay should retry asok registration upon failure 28158/head
authorJason Dillaman <dillaman@redhat.com>
Sat, 23 Feb 2019 00:25:44 +0000 (19:25 -0500)
committerJason Dillaman <dillaman@redhat.com>
Fri, 17 May 2019 14:59:32 +0000 (10:59 -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)

Conflicts:
src/tools/rbd_mirror/ImageReplayer.cc: trivial resolution

src/tools/rbd_mirror/ImageReplayer.cc

index 77331d8c332a74655d8a3c66576b32ad5e1b6bed..75596e4f158bc491c448b5bfb90e42ab4780a9dc 100644 (file)
@@ -1829,7 +1829,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;