From: chunmei Liu Date: Tue, 7 May 2019 20:56:35 +0000 (-0700) Subject: crimson/osd: support write pid_file when osd start X-Git-Tag: v15.1.0~2731^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F27413%2Fhead;p=ceph.git crimson/osd: support write pid_file when osd start Signed-off-by: chunmei Liu --- diff --git a/src/crimson/CMakeLists.txt b/src/crimson/CMakeLists.txt index a895fe20e018..22c2266fe97d 100644 --- a/src/crimson/CMakeLists.txt +++ b/src/crimson/CMakeLists.txt @@ -70,6 +70,7 @@ add_library(crimson-common STATIC ${PROJECT_SOURCE_DIR}/src/common/Thread.cc ${PROJECT_SOURCE_DIR}/src/common/HeartbeatMap.cc ${PROJECT_SOURCE_DIR}/src/common/PluginRegistry.cc + ${PROJECT_SOURCE_DIR}/src/global/pidfile.cc ${PROJECT_SOURCE_DIR}/src/librbd/Features.cc ${PROJECT_SOURCE_DIR}/src/log/Log.cc ${PROJECT_SOURCE_DIR}/src/mgr/ServiceMap.cc diff --git a/src/crimson/osd/main.cc b/src/crimson/osd/main.cc index 608905b912c6..449f0cc35d6a 100644 --- a/src/crimson/osd/main.cc +++ b/src/crimson/osd/main.cc @@ -13,6 +13,7 @@ #include "common/ceph_argparse.h" #include "crimson/common/config_proxy.h" #include "crimson/net/SocketMessenger.h" +#include "global/pidfile.h" #include "osd.h" @@ -105,6 +106,7 @@ int main(int argc, char* argv[]) }); local_conf().parse_config_files(conf_file_list).get(); local_conf().parse_argv(ceph_args).get(); + pidfile_write(local_conf()->pid_file); const int whoami = std::stoi(local_conf()->name.get_id()); const auto nonce = static_cast(getpid()); for (auto [msgr, name] : {make_pair(std::ref(cluster_msgr), "cluster"s),