1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 * Ceph - scalable distributed file system
6 * Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
8 * This is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License version 2.1, as published by the Free Software
11 * Foundation. See file COPYING.
15 #include <sys/types.h>
18 #include <boost/scoped_ptr.hpp>
24 #include "os/ObjectStore.h"
25 #include "mon/MonClient.h"
26 #include "include/ceph_features.h"
28 #include "common/config.h"
30 #include "mon/MonMap.h"
32 #include "msg/Messenger.h"
34 #include "common/Throttle.h"
35 #include "common/Timer.h"
36 #include "common/TracepointProvider.h"
37 #include "common/ceph_argparse.h"
38 #include "common/numa.h"
40 #include "global/global_init.h"
41 #include "global/signal_handler.h"
43 #include "include/color.h"
44 #include "common/errno.h"
45 #include "common/pick_address.h"
47 #include "perfglue/heap_profiler.h"
49 #include "include/ceph_assert.h"
51 #include "common/Preforker.h"
53 #define dout_context g_ceph_context
54 #define dout_subsys ceph_subsys_osd
58 TracepointProvider::Traits
osd_tracepoint_traits("libosd_tp.so",
60 TracepointProvider::Traits
os_tracepoint_traits("libos_tp.so",
61 "osd_objectstore_tracing");
62 TracepointProvider::Traits
bluestore_tracepoint_traits("libbluestore_tp.so",
64 #ifdef WITH_OSD_INSTRUMENT_FUNCTIONS
65 TracepointProvider::Traits
cyg_profile_traits("libcyg_profile_tp.so",
66 "osd_function_tracing");
69 } // anonymous namespace
71 OSD
*osdptr
= nullptr;
73 void handle_osd_signal(int signum
)
76 osdptr
->handle_signal(signum
);
81 cout
<< "usage: ceph-osd -i <ID> [flags]\n"
82 << " --osd-data PATH data directory\n"
83 << " --osd-journal PATH\n"
84 << " journal file or block device\n"
85 << " --mkfs create a [new] data directory\n"
86 << " --mkkey generate a new secret key. This is normally used in combination with --mkfs\n"
87 << " --monmap specify the path to the monitor map. This is normally used in combination with --mkfs\n"
88 << " --osd-uuid specify the OSD's fsid. This is normally used in combination with --mkfs\n"
89 << " --keyring specify a path to the osd keyring. This is normally used in combination with --mkfs\n"
90 << " --convert-filestore\n"
91 << " run any pending upgrade operations\n"
92 << " --flush-journal flush all data out of journal\n"
93 << " --dump-journal dump all data of journal\n"
94 << " --mkjournal initialize a new journal\n"
95 << " --check-wants-journal\n"
96 << " check whether a journal is desired\n"
97 << " --check-allows-journal\n"
98 << " check whether a journal is allowed\n"
99 << " --check-needs-journal\n"
100 << " check whether a journal is required\n"
101 << " --debug_osd <N> set debug level (e.g. 10)\n"
102 << " --get-device-fsid PATH\n"
103 << " get OSD fsid for the given block device\n"
105 generic_server_usage();
108 int main(int argc
, const char **argv
)
110 vector
<const char*> args
;
111 argv_to_vec(argc
, argv
, args
);
113 cerr
<< argv
[0] << ": -h or --help for usage" << std::endl
;
116 if (ceph_argparse_need_usage(args
)) {
121 map
<string
,string
> defaults
= {
122 // We want to enable leveldb's log, while allowing users to override this
123 // option, therefore we will pass it as a default argument to global_init().
124 { "leveldb_log", "" }
126 auto cct
= global_init(
128 args
, CEPH_ENTITY_TYPE_OSD
,
129 CODE_ENVIRONMENT_DAEMON
,
131 ceph_heap_profiler_init();
137 bool mkjournal
= false;
138 bool check_wants_journal
= false;
139 bool check_allows_journal
= false;
140 bool check_needs_journal
= false;
142 bool flushjournal
= false;
143 bool dump_journal
= false;
144 bool convertfilestore
= false;
145 bool get_osd_fsid
= false;
146 bool get_cluster_fsid
= false;
147 bool get_journal_fsid
= false;
148 bool get_device_fsid
= false;
150 std::string dump_pg_log
;
153 for (std::vector
<const char*>::iterator i
= args
.begin(); i
!= args
.end(); ) {
154 if (ceph_argparse_double_dash(args
, i
)) {
156 } else if (ceph_argparse_flag(args
, i
, "--mkfs", (char*)NULL
)) {
158 } else if (ceph_argparse_flag(args
, i
, "--mkjournal", (char*)NULL
)) {
160 } else if (ceph_argparse_flag(args
, i
, "--check-allows-journal", (char*)NULL
)) {
161 check_allows_journal
= true;
162 } else if (ceph_argparse_flag(args
, i
, "--check-wants-journal", (char*)NULL
)) {
163 check_wants_journal
= true;
164 } else if (ceph_argparse_flag(args
, i
, "--check-needs-journal", (char*)NULL
)) {
165 check_needs_journal
= true;
166 } else if (ceph_argparse_flag(args
, i
, "--mkkey", (char*)NULL
)) {
168 } else if (ceph_argparse_flag(args
, i
, "--flush-journal", (char*)NULL
)) {
170 } else if (ceph_argparse_flag(args
, i
, "--convert-filestore", (char*)NULL
)) {
171 convertfilestore
= true;
172 } else if (ceph_argparse_witharg(args
, i
, &val
, "--dump-pg-log", (char*)NULL
)) {
174 } else if (ceph_argparse_flag(args
, i
, "--dump-journal", (char*)NULL
)) {
176 } else if (ceph_argparse_flag(args
, i
, "--get-cluster-fsid", (char*)NULL
)) {
177 get_cluster_fsid
= true;
178 } else if (ceph_argparse_flag(args
, i
, "--get-osd-fsid", "--get-osd-uuid", (char*)NULL
)) {
180 } else if (ceph_argparse_flag(args
, i
, "--get-journal-fsid", "--get-journal-uuid", (char*)NULL
)) {
181 get_journal_fsid
= true;
182 } else if (ceph_argparse_witharg(args
, i
, &device_path
,
183 "--get-device-fsid", (char*)NULL
)) {
184 get_device_fsid
= true;
190 cerr
<< "unrecognized arg " << args
[0] << std::endl
;
194 if (global_init_prefork(g_ceph_context
) >= 0) {
196 int r
= forker
.prefork(err
);
198 cerr
<< err
<< std::endl
;
201 if (forker
.is_parent()) {
202 g_ceph_context
->_log
->start();
203 if (forker
.parent_wait(err
) != 0) {
209 global_init_postfork_start(g_ceph_context
);
211 common_init_finish(g_ceph_context
);
212 global_init_chdir(g_ceph_context
);
214 if (get_journal_fsid
) {
215 device_path
= g_conf().get_val
<std::string
>("osd_journal");
216 get_device_fsid
= true;
218 if (get_device_fsid
) {
220 int r
= ObjectStore::probe_block_device_fsid(g_ceph_context
, device_path
,
223 cerr
<< "failed to get device fsid for " << device_path
224 << ": " << cpp_strerror(r
) << std::endl
;
227 cout
<< uuid
<< std::endl
;
231 if (!dump_pg_log
.empty()) {
232 common_init_finish(g_ceph_context
);
236 if (bl
.read_file(dump_pg_log
.c_str(), &error
) >= 0) {
238 auto p
= bl
.cbegin();
240 uint64_t pos
= p
.get_off();
244 catch (const buffer::error
&e
) {
245 derr
<< "failed to decode LogEntry at offset " << pos
<< dendl
;
248 derr
<< pos
<< ":\t" << e
<< dendl
;
251 derr
<< "unable to open " << dump_pg_log
<< ": " << error
<< dendl
;
258 const char *id
= g_conf()->name
.get_id().c_str();
259 int whoami
= strtol(id
, &end
, 10);
260 std::string data_path
= g_conf().get_val
<std::string
>("osd_data");
261 if (*end
|| end
== id
|| whoami
< 0) {
262 derr
<< "must specify '-i #' where # is the osd number" << dendl
;
266 if (data_path
.empty()) {
267 derr
<< "must specify '--osd-data=foo' data path" << dendl
;
272 std::string store_type
;
275 snprintf(fn
, sizeof(fn
), "%s/type", data_path
.c_str());
276 int fd
= ::open(fn
, O_RDONLY
|O_CLOEXEC
);
281 store_type
= string(bl
.c_str(), bl
.length() - 1); // drop \n
282 dout(5) << "object store type is " << store_type
<< dendl
;
286 store_type
= g_conf().get_val
<std::string
>("osd_objectstore");
288 // hrm, infer the type
289 snprintf(fn
, sizeof(fn
), "%s/current", data_path
.c_str());
291 if (::stat(fn
, &st
) == 0 &&
292 S_ISDIR(st
.st_mode
)) {
293 derr
<< "missing 'type' file, inferring filestore from current/ dir"
295 store_type
= "filestore";
297 snprintf(fn
, sizeof(fn
), "%s/block", data_path
.c_str());
298 if (::stat(fn
, &st
) == 0 &&
299 S_ISLNK(st
.st_mode
)) {
300 derr
<< "missing 'type' file, inferring bluestore from block symlink"
302 store_type
= "bluestore";
304 derr
<< "missing 'type' file and unable to infer osd type" << dendl
;
311 std::string journal_path
= g_conf().get_val
<std::string
>("osd_journal");
312 uint32_t flags
= g_conf().get_val
<uint64_t>("osd_os_flags");
313 ObjectStore
*store
= ObjectStore::create(g_ceph_context
,
319 derr
<< "unable to create object store" << dendl
;
320 forker
.exit(-ENODEV
);
325 common_init_finish(g_ceph_context
);
328 EntityName ename
{g_conf()->name
};
331 std::string keyring_path
= g_conf().get_val
<std::string
>("keyring");
332 int ret
= keyring
.load(g_ceph_context
, keyring_path
);
334 keyring
.get_auth(ename
, eauth
)) {
335 derr
<< "already have key in keyring " << keyring_path
<< dendl
;
337 eauth
.key
.create(g_ceph_context
, CEPH_CRYPTO_AES
);
338 keyring
.add(ename
, eauth
);
340 keyring
.encode_plaintext(bl
);
341 int r
= bl
.write_file(keyring_path
.c_str(), 0600);
343 derr
<< TEXT_RED
<< " ** ERROR: writing new keyring to "
344 << keyring_path
<< ": " << cpp_strerror(r
) << TEXT_NORMAL
347 derr
<< "created new key in keyring " << keyring_path
<< dendl
;
351 common_init_finish(g_ceph_context
);
353 if (g_conf().get_val
<uuid_d
>("fsid").is_zero()) {
354 derr
<< "must specify cluster fsid" << dendl
;
355 forker
.exit(-EINVAL
);
358 int err
= OSD::mkfs(g_ceph_context
, store
, g_conf().get_val
<uuid_d
>("fsid"),
361 derr
<< TEXT_RED
<< " ** ERROR: error creating empty object store in "
362 << data_path
<< ": " << cpp_strerror(-err
) << TEXT_NORMAL
<< dendl
;
365 dout(0) << "created object store " << data_path
366 << " for osd." << whoami
367 << " fsid " << g_conf().get_val
<uuid_d
>("fsid")
374 common_init_finish(g_ceph_context
);
375 int err
= store
->mkjournal();
377 derr
<< TEXT_RED
<< " ** ERROR: error creating fresh journal "
378 << journal_path
<< " for object store " << data_path
<< ": "
379 << cpp_strerror(-err
) << TEXT_NORMAL
<< dendl
;
382 derr
<< "created new journal " << journal_path
383 << " for object store " << data_path
<< dendl
;
386 if (check_wants_journal
) {
387 if (store
->wants_journal()) {
388 cout
<< "wants journal: yes" << std::endl
;
391 cout
<< "wants journal: no" << std::endl
;
395 if (check_allows_journal
) {
396 if (store
->allows_journal()) {
397 cout
<< "allows journal: yes" << std::endl
;
400 cout
<< "allows journal: no" << std::endl
;
404 if (check_needs_journal
) {
405 if (store
->needs_journal()) {
406 cout
<< "needs journal: yes" << std::endl
;
409 cout
<< "needs journal: no" << std::endl
;
414 common_init_finish(g_ceph_context
);
415 int err
= store
->mount();
417 derr
<< TEXT_RED
<< " ** ERROR: error flushing journal " << journal_path
418 << " for object store " << data_path
419 << ": " << cpp_strerror(-err
) << TEXT_NORMAL
<< dendl
;
420 goto flushjournal_out
;
423 derr
<< "flushed journal " << journal_path
424 << " for object store " << data_path
428 forker
.exit(err
< 0 ? 1 : 0);
431 common_init_finish(g_ceph_context
);
432 int err
= store
->dump_journal(cout
);
434 derr
<< TEXT_RED
<< " ** ERROR: error dumping journal " << journal_path
435 << " for object store " << data_path
436 << ": " << cpp_strerror(-err
) << TEXT_NORMAL
<< dendl
;
439 derr
<< "dumped journal " << journal_path
440 << " for object store " << data_path
446 if (convertfilestore
) {
447 int err
= store
->mount();
449 derr
<< TEXT_RED
<< " ** ERROR: error mounting store " << data_path
450 << ": " << cpp_strerror(-err
) << TEXT_NORMAL
<< dendl
;
453 err
= store
->upgrade();
456 derr
<< TEXT_RED
<< " ** ERROR: error converting store " << data_path
457 << ": " << cpp_strerror(-err
) << TEXT_NORMAL
<< dendl
;
464 uuid_d cluster_fsid
, osd_fsid
;
465 ceph_release_t require_osd_release
= ceph_release_t::unknown
;
467 int r
= OSD::peek_meta(store
, &magic
, &cluster_fsid
, &osd_fsid
, &w
,
468 &require_osd_release
);
470 derr
<< TEXT_RED
<< " ** ERROR: unable to open OSD superblock on "
471 << data_path
<< ": " << cpp_strerror(-r
)
472 << TEXT_NORMAL
<< dendl
;
474 derr
<< TEXT_RED
<< " ** please verify that underlying storage "
475 << "supports xattrs" << TEXT_NORMAL
<< dendl
;
480 derr
<< "OSD id " << w
<< " != my id " << whoami
<< dendl
;
483 if (strcmp(magic
.c_str(), CEPH_OSD_ONDISK_MAGIC
)) {
484 derr
<< "OSD magic " << magic
<< " != my " << CEPH_OSD_ONDISK_MAGIC
489 if (get_cluster_fsid
) {
490 cout
<< cluster_fsid
<< std::endl
;
494 cout
<< osd_fsid
<< std::endl
;
499 auto from_release
= require_osd_release
;
501 if (!can_upgrade_from(from_release
, "require_osd_release", err
)) {
502 derr
<< err
.str() << dendl
;
507 // consider objectstore numa node
508 int os_numa_node
= -1;
509 r
= store
->get_numa_node(&os_numa_node
, nullptr, nullptr);
510 if (r
>= 0 && os_numa_node
>= 0) {
511 dout(1) << " objectstore numa_node " << os_numa_node
<< dendl
;
513 int iface_preferred_numa_node
= -1;
514 if (g_conf().get_val
<bool>("osd_numa_prefer_iface")) {
515 iface_preferred_numa_node
= os_numa_node
;
519 std::string msg_type
= g_conf().get_val
<std::string
>("ms_type");
520 std::string public_msg_type
=
521 g_conf().get_val
<std::string
>("ms_public_type");
522 std::string cluster_msg_type
=
523 g_conf().get_val
<std::string
>("ms_cluster_type");
525 public_msg_type
= public_msg_type
.empty() ? msg_type
: public_msg_type
;
526 cluster_msg_type
= cluster_msg_type
.empty() ? msg_type
: cluster_msg_type
;
527 uint64_t nonce
= Messenger::get_pid_nonce();
528 Messenger
*ms_public
= Messenger::create(g_ceph_context
, public_msg_type
,
529 entity_name_t::OSD(whoami
), "client",
531 Messenger::HAS_HEAVY_TRAFFIC
|
532 Messenger::HAS_MANY_CONNECTIONS
);
533 Messenger
*ms_cluster
= Messenger::create(g_ceph_context
, cluster_msg_type
,
534 entity_name_t::OSD(whoami
), "cluster",
536 Messenger::HAS_HEAVY_TRAFFIC
|
537 Messenger::HAS_MANY_CONNECTIONS
);
538 Messenger
*ms_hb_back_client
= Messenger::create(g_ceph_context
, cluster_msg_type
,
539 entity_name_t::OSD(whoami
), "hb_back_client",
540 nonce
, Messenger::HEARTBEAT
);
541 Messenger
*ms_hb_front_client
= Messenger::create(g_ceph_context
, public_msg_type
,
542 entity_name_t::OSD(whoami
), "hb_front_client",
543 nonce
, Messenger::HEARTBEAT
);
544 Messenger
*ms_hb_back_server
= Messenger::create(g_ceph_context
, cluster_msg_type
,
545 entity_name_t::OSD(whoami
), "hb_back_server",
546 nonce
, Messenger::HEARTBEAT
);
547 Messenger
*ms_hb_front_server
= Messenger::create(g_ceph_context
, public_msg_type
,
548 entity_name_t::OSD(whoami
), "hb_front_server",
549 nonce
, Messenger::HEARTBEAT
);
550 Messenger
*ms_objecter
= Messenger::create(g_ceph_context
, public_msg_type
,
551 entity_name_t::OSD(whoami
), "ms_objecter",
553 if (!ms_public
|| !ms_cluster
|| !ms_hb_front_client
|| !ms_hb_back_client
|| !ms_hb_back_server
|| !ms_hb_front_server
|| !ms_objecter
)
555 ms_cluster
->set_cluster_protocol(CEPH_OSD_PROTOCOL
);
556 ms_hb_front_client
->set_cluster_protocol(CEPH_OSD_PROTOCOL
);
557 ms_hb_back_client
->set_cluster_protocol(CEPH_OSD_PROTOCOL
);
558 ms_hb_back_server
->set_cluster_protocol(CEPH_OSD_PROTOCOL
);
559 ms_hb_front_server
->set_cluster_protocol(CEPH_OSD_PROTOCOL
);
561 dout(0) << "starting osd." << whoami
562 << " osd_data " << data_path
563 << " " << ((journal_path
.empty()) ?
564 "(no journal)" : journal_path
)
567 uint64_t message_size
=
568 g_conf().get_val
<Option::size_t>("osd_client_message_size_cap");
569 boost::scoped_ptr
<Throttle
> client_byte_throttler(
570 new Throttle(g_ceph_context
, "osd_client_bytes", message_size
));
572 // All feature bits 0 - 34 should be present from dumpling v0.67 forward
573 uint64_t osd_required
=
575 CEPH_FEATURE_PGID64
|
578 ms_public
->set_default_policy(Messenger::Policy::stateless_registered_server(0));
579 ms_public
->set_policy_throttlers(entity_name_t::TYPE_CLIENT
,
580 client_byte_throttler
.get(),
582 ms_public
->set_policy(entity_name_t::TYPE_MON
,
583 Messenger::Policy::lossy_client(osd_required
));
584 ms_public
->set_policy(entity_name_t::TYPE_MGR
,
585 Messenger::Policy::lossy_client(osd_required
));
587 ms_cluster
->set_default_policy(Messenger::Policy::stateless_server(0));
588 ms_cluster
->set_policy(entity_name_t::TYPE_MON
, Messenger::Policy::lossy_client(0));
589 ms_cluster
->set_policy(entity_name_t::TYPE_OSD
,
590 Messenger::Policy::lossless_peer(osd_required
));
591 ms_cluster
->set_policy(entity_name_t::TYPE_CLIENT
,
592 Messenger::Policy::stateless_server(0));
594 ms_hb_front_client
->set_policy(entity_name_t::TYPE_OSD
,
595 Messenger::Policy::lossy_client(0));
596 ms_hb_back_client
->set_policy(entity_name_t::TYPE_OSD
,
597 Messenger::Policy::lossy_client(0));
598 ms_hb_back_server
->set_policy(entity_name_t::TYPE_OSD
,
599 Messenger::Policy::stateless_server(0));
600 ms_hb_front_server
->set_policy(entity_name_t::TYPE_OSD
,
601 Messenger::Policy::stateless_server(0));
603 ms_objecter
->set_default_policy(Messenger::Policy::lossy_client(CEPH_FEATURE_OSDREPLYMUX
));
605 entity_addrvec_t public_addrs
, cluster_addrs
;
606 r
= pick_addresses(g_ceph_context
, CEPH_PICK_ADDRESS_PUBLIC
, &public_addrs
,
607 iface_preferred_numa_node
);
609 derr
<< "Failed to pick public address." << dendl
;
612 r
= pick_addresses(g_ceph_context
, CEPH_PICK_ADDRESS_CLUSTER
, &cluster_addrs
,
613 iface_preferred_numa_node
);
615 derr
<< "Failed to pick cluster address." << dendl
;
619 if (ms_public
->bindv(public_addrs
) < 0)
622 if (ms_cluster
->bindv(cluster_addrs
) < 0)
625 bool is_delay
= g_conf().get_val
<bool>("osd_heartbeat_use_min_delay_socket");
627 ms_hb_front_client
->set_socket_priority(SOCKET_PRIORITY_MIN_DELAY
);
628 ms_hb_back_client
->set_socket_priority(SOCKET_PRIORITY_MIN_DELAY
);
629 ms_hb_back_server
->set_socket_priority(SOCKET_PRIORITY_MIN_DELAY
);
630 ms_hb_front_server
->set_socket_priority(SOCKET_PRIORITY_MIN_DELAY
);
633 entity_addrvec_t hb_front_addrs
= public_addrs
;
634 for (auto& a
: hb_front_addrs
.v
) {
637 if (ms_hb_front_server
->bindv(hb_front_addrs
) < 0)
639 if (ms_hb_front_client
->client_bind(hb_front_addrs
.front()) < 0)
642 entity_addrvec_t hb_back_addrs
= cluster_addrs
;
643 for (auto& a
: hb_back_addrs
.v
) {
646 if (ms_hb_back_server
->bindv(hb_back_addrs
) < 0)
648 if (ms_hb_back_client
->client_bind(hb_back_addrs
.front()) < 0)
651 // install signal handlers
652 init_async_signal_handler();
653 register_async_signal_handler(SIGHUP
, sighup_handler
);
655 TracepointProvider::initialize
<osd_tracepoint_traits
>(g_ceph_context
);
656 TracepointProvider::initialize
<os_tracepoint_traits
>(g_ceph_context
);
657 TracepointProvider::initialize
<bluestore_tracepoint_traits
>(g_ceph_context
);
658 #ifdef WITH_OSD_INSTRUMENT_FUNCTIONS
659 TracepointProvider::initialize
<cyg_profile_traits
>(g_ceph_context
);
662 srand(time(NULL
) + getpid());
664 MonClient
mc(g_ceph_context
);
665 if (mc
.build_initial_monmap() < 0)
667 global_init_chdir(g_ceph_context
);
669 if (global_init_preload_erasure_code(g_ceph_context
) < 0) {
673 osdptr
= new OSD(g_ceph_context
,
687 int err
= osdptr
->pre_init();
689 derr
<< TEXT_RED
<< " ** ERROR: osd pre_init failed: " << cpp_strerror(-err
)
690 << TEXT_NORMAL
<< dendl
;
695 ms_hb_front_client
->start();
696 ms_hb_back_client
->start();
697 ms_hb_front_server
->start();
698 ms_hb_back_server
->start();
700 ms_objecter
->start();
703 err
= osdptr
->init();
705 derr
<< TEXT_RED
<< " ** ERROR: osd init failed: " << cpp_strerror(-err
)
706 << TEXT_NORMAL
<< dendl
;
712 if (g_conf()->daemonize
) {
713 global_init_postfork_finish(g_ceph_context
);
718 register_async_signal_handler_oneshot(SIGINT
, handle_osd_signal
);
719 register_async_signal_handler_oneshot(SIGTERM
, handle_osd_signal
);
721 osdptr
->final_init();
723 if (g_conf().get_val
<bool>("inject_early_sigterm"))
724 kill(getpid(), SIGTERM
);
727 ms_hb_front_client
->wait();
728 ms_hb_back_client
->wait();
729 ms_hb_front_server
->wait();
730 ms_hb_back_server
->wait();
734 unregister_async_signal_handler(SIGHUP
, sighup_handler
);
735 unregister_async_signal_handler(SIGINT
, handle_osd_signal
);
736 unregister_async_signal_handler(SIGTERM
, handle_osd_signal
);
737 shutdown_async_signal_handler();
742 delete ms_hb_front_client
;
743 delete ms_hb_back_client
;
744 delete ms_hb_front_server
;
745 delete ms_hb_back_server
;
749 client_byte_throttler
.reset();
751 // cd on exit, so that gmon.out (if any) goes into a separate directory for each node.
753 snprintf(s
, sizeof(s
), "gmon/%d", getpid());
754 if ((mkdir(s
, 0755) == 0) && (chdir(s
) == 0)) {
755 dout(0) << "ceph-osd: gmon.out should be in " << s
<< dendl
;