]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: move stats_timer after store is mounted
authorYingxin Cheng <yingxin.cheng@intel.com>
Tue, 21 May 2024 06:00:28 +0000 (14:00 +0800)
committerMatan Breizman <mbreizma@redhat.com>
Sun, 16 Jun 2024 10:22:27 +0000 (13:22 +0300)
To report stats after the store is initialized.

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
(cherry picked from commit f183adb469ceb647fd2c2dad25d10adbc891b711)

src/crimson/osd/osd.cc

index 0a40a7158f8a700523b05a46494c82df28652bd4..6bdda0a8cf929861d80ba4ae87c82805158c3cc4 100644 (file)
@@ -384,6 +384,16 @@ seastar::future<> OSD::start()
         std::ref(store),
         std::ref(osd_states));
     });
+  }).then([this, FNAME] {
+    heartbeat.reset(new Heartbeat{
+       whoami, get_shard_services(),
+       *monc, *hb_front_msgr, *hb_back_msgr});
+    return store.mount().handle_error(
+      crimson::stateful_ec::assert_failure([FNAME] (const auto& ec) {
+        ERROR("error mounting object store in {}: ({}) {}",
+             local_conf().get_val<std::string>("osd_data"),
+             ec.value(), ec.message());
+      }));
   }).then([this, FNAME] {
     auto stats_seconds = local_conf().get_val<int64_t>("crimson_osd_stat_interval");
     if (stats_seconds > 0) {
@@ -407,16 +417,6 @@ seastar::future<> OSD::start()
       stats_timer.arm_periodic(std::chrono::seconds(stats_seconds));
     }
 
-    heartbeat.reset(new Heartbeat{
-       whoami, get_shard_services(),
-       *monc, *hb_front_msgr, *hb_back_msgr});
-    return store.mount().handle_error(
-      crimson::stateful_ec::assert_failure([FNAME] (const auto& ec) {
-        ERROR("error mounting object store in {}: ({}) {}",
-             local_conf().get_val<std::string>("osd_data"),
-             ec.value(), ec.message());
-      }));
-  }).then([this] {
     return open_meta_coll();
   }).then([this] {
     return pg_shard_manager.get_meta_coll().load_superblock(