From 2c2da4cbc068e5200fa8a4b1c5bb7a4a7efbb737 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Wed, 17 Oct 2018 17:16:05 -0400 Subject: [PATCH] rbd-mirror: always attempt to restart canceled status update task Fixes: http://tracker.ceph.com/issues/36500 Signed-off-by: Jason Dillaman (cherry picked from commit d3363e61395bc5789533285c77ccff5be0c4b412) Signed-off-by: Nathan Cutler Conflicts: src/tools/rbd_mirror/ImageReplayer.cc - in luminous "canceled task" is mentioned in log at debug level 20 (in master not) --- src/tools/rbd_mirror/ImageReplayer.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/rbd_mirror/ImageReplayer.cc b/src/tools/rbd_mirror/ImageReplayer.cc index 9860089a303b..11bc08bf48c7 100644 --- a/src/tools/rbd_mirror/ImageReplayer.cc +++ b/src/tools/rbd_mirror/ImageReplayer.cc @@ -1503,9 +1503,8 @@ void ImageReplayer::reschedule_update_status_task(int new_interval) { m_update_status_interval = new_interval; } - bool restarting = (new_interval == 0 || canceled_task); if (new_interval >= 0 && is_running_() && - start_mirror_image_status_update(false, restarting)) { + start_mirror_image_status_update(true, false)) { m_update_status_task = new FunctionContext( [this](int r) { assert(m_threads->timer_lock.is_locked()); @@ -1520,6 +1519,7 @@ void ImageReplayer::reschedule_update_status_task(int new_interval) { if (canceled_task) { dout(20) << "canceled task" << dendl; + // decrement in-flight status update counter for canceled task finish_mirror_image_status_update(); } } -- 2.47.3