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: v12.2.13~181^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ee01a27101d00ab7db0466e1d000f194b18caad0;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 (cherry picked from commit 2d2d3bbc791e807bb0c83072aaeee023116884ce) Conflicts: src/tools/rbd_mirror/ImageReplayer.cc: trivial resolution --- diff --git a/src/tools/rbd_mirror/ImageReplayer.cc b/src/tools/rbd_mirror/ImageReplayer.cc index 77331d8c332a..75596e4f158b 100644 --- a/src/tools/rbd_mirror/ImageReplayer.cc +++ b/src/tools/rbd_mirror/ImageReplayer.cc @@ -1829,7 +1829,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;