From 510afbe91f2578ddf776ff7c8174760001a58e24 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 9 Oct 2017 17:02:50 -0500 Subject: [PATCH] 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 --- src/mon/OSDMonitor.cc | 4 ++++ 1 file changed, 4 insertions(+) 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) -- 2.39.5