]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd-mirror: always attempt to restart canceled status update task 24917/head
authorJason Dillaman <dillaman@redhat.com>
Wed, 17 Oct 2018 21:16:05 +0000 (17:16 -0400)
committerNathan Cutler <ncutler@suse.com>
Sat, 3 Nov 2018 23:20:11 +0000 (00:20 +0100)
Fixes: http://tracker.ceph.com/issues/36500
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit d3363e61395bc5789533285c77ccff5be0c4b412)
Signed-off-by: Nathan Cutler <ncutler@suse.com>
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

index 9860089a303b6bdb6f50405f4add6692607d5630..11bc08bf48c74133a22a2f0a9e92be3eb0f58e40 100644 (file)
@@ -1503,9 +1503,8 @@ void ImageReplayer<I>::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<I>::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();
   }
 }