From 6c2bd5a3279f5c2f22393cbac8b4c6c0a7d81d68 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 3 Aug 2020 11:04:38 +0800 Subject: [PATCH] crimson/osd: ignore SIGHUP ignore SIGHUP, as crimson does not write log messages using the facilities offered by ceph::logging. it uses seastar::logger instead. and seastar::logger writes to stderr, stdout and/or syslog. there is no need to reopen the log file when the settings change. and we do send SIGHUP to OSD processes when performing thrash tests. to avoid killing crimson-osd processes by accident. SIGHUP is ignored. Signed-off-by: Kefu Chai --- src/crimson/osd/main.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/crimson/osd/main.cc b/src/crimson/osd/main.cc index adce07981d39..9c31b9942e19 100644 --- a/src/crimson/osd/main.cc +++ b/src/crimson/osd/main.cc @@ -172,6 +172,8 @@ int main(int argc, char* argv[]) ceph_abort_msg(fmt::format("pidfile_write failed with {} {}", ret, cpp_strerror(-ret))); } + // just ignore SIGHUP, we don't reread settings + seastar::engine().handle_signal(SIGHUP, [] {}); const int whoami = std::stoi(local_conf()->name.get_id()); const auto nonce = get_nonce(); crimson::net::MessengerRef cluster_msgr, client_msgr; -- 2.47.3