From 2a9330fb2489bcde5ce9e68ec08d4b7f044332c4 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 4 Oct 2011 13:36:05 -0700 Subject: [PATCH] osd: do not request osdmap when loner if not booted Signed-off-by: Sage Weil --- src/osd/OSD.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index d1d5c238c8651..71bb8cc6b0a99 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -1748,7 +1748,7 @@ void OSD::heartbeat() // hmm.. am i all alone? dout(30) << "heartbeat lonely?" << dendl; if (heartbeat_from.empty() || heartbeat_to.empty()) { - if (now - last_mon_heartbeat > g_conf->osd_mon_heartbeat_interval) { + if (now - last_mon_heartbeat > g_conf->osd_mon_heartbeat_interval && is_active()) { last_mon_heartbeat = now; dout(10) << "i have no heartbeat peers; checking mon for new map" << dendl; monc->sub_want("osdmap", osdmap->get_epoch() + 1, CEPH_SUBSCRIBE_ONETIME); -- 2.39.5