]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: cancel mapping job from update_from_paxos 15320/head
authorSage Weil <sage@redhat.com>
Fri, 26 May 2017 18:09:59 +0000 (14:09 -0400)
committerSage Weil <sage@redhat.com>
Fri, 26 May 2017 18:09:59 +0000 (14:09 -0400)
On the leader we cancel the mapping job in encode_pending.  On a peon,
we don't cancel it at all!  It is surprising this didn't already cause
problems, but with the PGtempMap is pretty reliably crashes with a
largish map.

Fixes: http://tracker.ceph.com/issues/20067
Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/OSDMonitor.cc

index e28621cffafda6770fdd6600f5232e85c7307fa7..87bb5bfb7c2de841d1df348787390715f96b50f5 100644 (file)
@@ -256,6 +256,15 @@ void OSDMonitor::update_from_paxos(bool *need_bootstrap)
   dout(15) << "update_from_paxos paxos e " << version
           << ", my e " << osdmap.epoch << dendl;
 
+  if (mapping_job) {
+    if (!mapping_job->is_done()) {
+      dout(1) << __func__ << " mapping job "
+             << mapping_job.get() << " did not complete, "
+             << mapping_job->shards << " left, canceling" << dendl;
+      mapping_job->abort();
+    }
+    mapping_job.reset();
+  }
 
   /*
    * We will possibly have a stashed latest that *we* wrote, and we will