Skip to content

Commit

Permalink
crimson/osd: support write pid_file when osd start
Browse files Browse the repository at this point in the history
Signed-off-by: chunmei Liu <chunmei.liu@intel.com>
  • Loading branch information
liu-chunmei committed May 7, 2019
1 parent a3de279 commit 4a6028c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/crimson/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/crimson/osd/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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<uint32_t>(getpid());
for (auto [msgr, name] : {make_pair(std::ref(cluster_msgr), "cluster"s),
Expand Down

0 comments on commit 4a6028c

Please sign in to comment.