]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: don't mark down old _to peers that are still _from peers
authorSage Weil <sage@newdream.net>
Thu, 26 Aug 2010 18:34:32 +0000 (11:34 -0700)
committerSage Weil <sage@newdream.net>
Thu, 26 Aug 2010 19:31:53 +0000 (12:31 -0700)
It's harmless, but not ideal.

src/osd/OSD.cc

index f5fc78eb11c60384f769e8a61997093364b8fe4f..52d8e7c48842149f302f1798da06b8bff79b95e5 100644 (file)
@@ -1224,9 +1224,14 @@ void OSD::update_heartbeat_peers()
       heartbeat_to[p->first] = p->second;
       heartbeat_inst[p->first] = old_inst[p->first];
     } else {
-      dout(10) << "update_heartbeat_peers: marking down old _to peer " << old_inst[p->first] 
-              << " as of " << p->second << dendl;
-      heartbeat_messenger->mark_down(old_inst[p->first].addr);
+      if (heartbeat_from.count(p->first) && old_inst[p->first] == heartbeat_inst[p->first]) {
+       dout(10) << "update_heartbeat_peers: old _to peer " << old_inst[p->first] 
+                << " is still a _from peer, not marking down" << dendl;
+      } else {
+       dout(10) << "update_heartbeat_peers: marking down old _to peer " << old_inst[p->first] 
+                << " as of " << p->second << dendl;
+       heartbeat_messenger->mark_down(old_inst[p->first].addr);
+      }
 
       if (!osdmap->is_down(p->first) &&
          osdmap->get_hb_inst(p->first) == old_inst[p->first]) {