]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/osd: do not cluster_msgr.set_myaddrs() in background
authorKefu Chai <kchai@redhat.com>
Thu, 19 Sep 2019 08:26:56 +0000 (16:26 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 19 Sep 2019 08:31:26 +0000 (16:31 +0800)
we should do the initialization in foreground

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

index 39369463c9f371b17e15aa050b7e9ab841ab3473..ca5ababac3dc8ad2eb726e02ecdbe38fccb792f8 100644 (file)
@@ -264,8 +264,11 @@ seastar::future<> OSD::start()
     if (auto [addrs, changed] =
         replace_unknown_addrs(cluster_msgr.get_myaddrs(),
                               public_msgr.get_myaddrs()); changed) {
-      cluster_msgr.set_myaddrs(addrs);
+      return cluster_msgr.set_myaddrs(addrs);
+    } else {
+      return seastar::now();
     }
+  }).then([this] {
     return heartbeat->start(public_msgr.get_myaddrs(),
                             cluster_msgr.get_myaddrs());
   }).then([this] {