]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/osd: do not add whoami as hb peer
authorKefu Chai <kchai@redhat.com>
Tue, 2 Apr 2019 06:23:55 +0000 (14:23 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 2 Apr 2019 06:25:24 +0000 (14:25 +0800)
it does not make sense to say hello to myself.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/osd/osd.cc

index 032f2fe1a855083a8fb14dd549788988c6fa81be..945f0cd6dc115fd4ce8c2728a20f18cd4ea1b2eb 100644 (file)
@@ -736,7 +736,7 @@ void OSD::update_heartbeat_peers()
                                  &up, nullptr,
                                  &acting, nullptr);
     for (auto osd : boost::join(up, acting)) {
-      if (osd != CRUSH_ITEM_NONE) {
+      if (osd != CRUSH_ITEM_NONE && osd != whoami) {
         heartbeat->add_peer(osd, osdmap->get_epoch());
       }
     }