From: Sage Weil Date: Tue, 16 Jul 2013 21:49:33 +0000 (-0700) Subject: mon/OSDMonitor: send_to_waiting() in on_active() X-Git-Tag: v0.67-rc1~64 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f06a124a7fa0717ef8c523408b31d814df57caca;p=ceph.git mon/OSDMonitor: send_to_waiting() in on_active() The send_latest() helper may put a message in the waiting_for_map list if we are not readable, but currently send_to_waiting() is only called from update_from_paxos(), and it is possible that we may be unreadable but not get a map update. Instead, share the map when we are active. Do the same for check_subs(), which is also about sharing the *new* map. Leave share_map_with_random_osd() and process_failures() which are not concerned with whether this is the latest map or not. This problem surfaced when we changed the timing of refresh relative to paxos commit, since update_from_paxos() is now not normally called while readable; see f1ce8d7c955a2443111bf7d9e16b4c563d445712 and c711203c0d4b924e5951aa808b243bf06e7ad23a. Fixes: #5643 Signed-off-by: Sage Weil Reviewed-by: Greg Farnum Reviewed-by: Joao Eduardo Luis --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index a2d3f491842d..eaec014516ba 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -185,12 +185,8 @@ void OSDMonitor::update_from_paxos(bool *need_bootstrap) mon->pgmon()->check_osd_map(osdmap.epoch); } - send_to_waiting(); - check_subs(); - - share_map_with_random_osd(); update_logger(); - + share_map_with_random_osd(); process_failures(); // make sure our feature bits reflect the latest map @@ -298,6 +294,9 @@ void OSDMonitor::on_active() { update_logger(); + send_to_waiting(); + check_subs(); + if (thrash_map && thrash()) propose_pending(); @@ -1291,6 +1290,7 @@ void OSDMonitor::_reply_map(PaxosServiceMessage *m, epoch_t e) { dout(7) << "_reply_map " << e << " from " << m->get_orig_source_inst() + << " for " << m << dendl; send_latest(m, e); }