]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: set dead_epoch for immediate failure (ECONNREFUSED)
authorSage Weil <sage@redhat.com>
Mon, 9 Oct 2017 22:02:50 +0000 (17:02 -0500)
committerSage Weil <sage@redhat.com>
Thu, 18 Jul 2019 17:20:32 +0000 (12:20 -0500)
If we are immediately declaring an osd down it is because we belive it is
truly dead.

Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/OSDMonitor.cc

index 0bc73206f8e627636fe779751786fffb86104fad..f69fdf0a5841e3bdb7be699fb520207ea6d0b5f3 100644 (file)
@@ -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)