]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: send beacon only if active
authorKefu Chai <kchai@redhat.com>
Sun, 16 Feb 2020 06:11:18 +0000 (14:11 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 16 Feb 2020 15:59:30 +0000 (23:59 +0800)
mimic the behavior of classic osd, and this behavior does make sense.

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

index 21faffd3bff9024d11f5804016a0646191d33553..483777628a19596569dce8f1fb9bf1260203a392 100644 (file)
@@ -1008,6 +1008,9 @@ seastar::future<> OSD::shutdown()
 
 seastar::future<> OSD::send_beacon()
 {
+  if (!state.is_active()) {
+    return seastar::now();
+  }
   // FIXME: min lec should be calculated from pg_stat
   //        and should set m->pgs
   epoch_t min_last_epoch_clean = osdmap->get_epoch();