From: Sage Weil Date: Mon, 9 Oct 2017 22:02:50 +0000 (-0500) Subject: mon/OSDMonitor: set dead_epoch for immediate failure (ECONNREFUSED) X-Git-Tag: v15.1.0~2076^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=510afbe91f2578ddf776ff7c8174760001a58e24;p=ceph.git mon/OSDMonitor: set dead_epoch for immediate failure (ECONNREFUSED) If we are immediately declaring an osd down it is because we belive it is truly dead. Signed-off-by: Sage Weil --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 0bc73206f8e..f69fdf0a584 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -2799,6 +2799,10 @@ void OSDMonitor::force_failure(int target_osd, int by) dout(1) << " we're forcing failure of osd." << target_osd << dendl; pending_inc.new_state[target_osd] = CEPH_OSD_UP; + if (!pending_inc.new_xinfo.count(target_osd)) { + pending_inc.new_xinfo[target_osd] = osdmap.osd_xinfo[target_osd]; + } + pending_inc.new_xinfo[target_osd].dead_epoch = pending_inc.epoch; mon->clog->info() << "osd." << target_osd << " failed (" << osdmap.crush->get_full_location_ordered_string(target_osd)