]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: send_to_waiting() in on_active()
authorSage Weil <sage@inktank.com>
Tue, 16 Jul 2013 21:49:33 +0000 (14:49 -0700)
committerSage Weil <sage@inktank.com>
Tue, 16 Jul 2013 21:49:59 +0000 (14:49 -0700)
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 <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
src/mon/OSDMonitor.cc

index a2d3f491842d3575de1c6929970c3b2cedabf990..eaec014516bab2de33e91aebd5a5bc72565a924c 100644 (file)
@@ -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);
 }