summaryrefslogtreecommitdiff
path: root/src/osd/OSD.cc
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-05-27 15:24:56 -0700
committerSage Weil <sage@inktank.com>2013-05-29 13:41:43 -0700
commitea2b2329b3a1ad3a5b5ce316811c75cb75165228 (patch)
tree151e3c2bda23ae305e11d6af6e5761dea5d115bb /src/osd/OSD.cc
parent1d0aa2add3fd768d767ae3b0d4d62922904aae94 (diff)
downloadceph-ea2b2329b3a1ad3a5b5ce316811c75cb75165228.tar.gz
osd: simplify is_healthy() check during boot
This has a slight behavior change in that we ask the mon for the latest osdmap if our internal heartbeat is failing. That isn't useful yet, but will be shortly. Signed-off-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'src/osd/OSD.cc')
-rw-r--r--src/osd/OSD.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc
index 8993a1100f5..26a601ed91a 100644
--- a/src/osd/OSD.cc
+++ b/src/osd/OSD.cc
@@ -3052,18 +3052,13 @@ void OSD::_maybe_boot(epoch_t oldest, epoch_t newest)
return;
}
- // if we are not healthy, do not mark ourselves up (yet)
- if (!g_ceph_context->get_heartbeat_map()->is_healthy()) {
- dout(5) << "not healthy, deferring boot" << dendl;
- state = STATE_WAITING_FOR_HEALTHY;
- return;
- }
-
// if our map within recent history, try to add ourselves to the osdmap.
if (osdmap->test_flag(CEPH_OSDMAP_NOUP)) {
dout(5) << "osdmap NOUP flag is set, waiting for it to clear" << dendl;
} else if (!g_ceph_context->get_heartbeat_map()->is_healthy()) {
+ // if we are not healthy, do not mark ourselves up (yet)
dout(1) << "internal heartbeats indicate we are not healthy; waiting to boot" << dendl;
+ state = STATE_WAITING_FOR_HEALTHY;
} else if (osdmap->get_epoch() >= oldest - 1 &&
osdmap->get_epoch() + g_conf->osd_map_message_max > newest) {
_send_boot();