]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: ignore SIGHUP 36417/head
authorKefu Chai <kchai@redhat.com>
Mon, 3 Aug 2020 03:04:38 +0000 (11:04 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 3 Aug 2020 03:04:40 +0000 (11:04 +0800)
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 <kchai@redhat.com>
src/crimson/osd/main.cc

index adce07981d39e490923a88aa042a1530005fafbb..9c31b9942e195dc1ef3677b1a00ec420e095a09e 100644 (file)
@@ -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;