From: Sage Weil Date: Thu, 24 Aug 2017 21:56:13 +0000 (-0400) Subject: osd: subscribe to new osdmap while waiting_for_healthy X-Git-Tag: v13.0.1~1090^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fbafa659dae94faba435ca449ee5e77b51108b4b;p=ceph-ci.git osd: subscribe to new osdmap while waiting_for_healthy 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 --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 6f3127d2e29..f192e611e71 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -5774,6 +5774,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()