From: Sage Weil Date: Fri, 26 May 2017 18:09:59 +0000 (-0400) Subject: mon/OSDMonitor: cancel mapping job from update_from_paxos X-Git-Tag: v12.1.0~57^2~23^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2e6317a1e742a61c28c99516f7e4427e0d8c94ab;p=ceph.git mon/OSDMonitor: cancel mapping job from update_from_paxos 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 --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index e28621cffafd..87bb5bfb7c2d 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -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