]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: subscribe to new osdmap while waiting_for_healthy 17498/head
authorSage Weil <sage@redhat.com>
Thu, 24 Aug 2017 21:56:13 +0000 (17:56 -0400)
committerNathan Cutler <ncutler@suse.com>
Tue, 5 Sep 2017 15:18:34 +0000 (17:18 +0200)
If we are sitting around waiting until we are able to ping our "up" peers,
we need to be sure that our notion of "up" is still correct and we're not
just stuck on an old, stale OSDMap.

Fixes: http://tracker.ceph.com/issues/21121
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit fbafa659dae94faba435ca449ee5e77b51108b4b)

src/osd/OSD.cc

index 28608f1250a9cdad07cd584d1f0f8390972c0841..d8ce26b129474da18b37af48a39e9bddca788d3c 100644 (file)
@@ -5785,6 +5785,9 @@ void OSD::start_waiting_for_healthy()
   dout(1) << "start_waiting_for_healthy" << dendl;
   set_state(STATE_WAITING_FOR_HEALTHY);
   last_heartbeat_resample = utime_t();
+
+  // subscribe to osdmap updates, in case our peers really are known to be dead
+  osdmap_subscribe(osdmap->get_epoch() + 1, false);
 }
 
 bool OSD::_is_healthy()