]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: do not request osdmap when loner if not booted
authorSage Weil <sage@newdream.net>
Tue, 4 Oct 2011 20:36:05 +0000 (13:36 -0700)
committerSage Weil <sage@newdream.net>
Tue, 4 Oct 2011 20:44:54 +0000 (13:44 -0700)
Signed-off-by: Sage Weil <sage@newdream.net>
src/osd/OSD.cc

index d1d5c238c86513c760d530d5978bd603ccb4a392..71bb8cc6b0a990f2905aac145f5157c0b3262284 100644 (file)
@@ -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);