From da3ba002862bf9074fba99df18dac37e9be9e353 Mon Sep 17 00:00:00 2001 From: huanwen ren Date: Tue, 16 Jan 2018 15:27:56 +0800 Subject: [PATCH] osd: Sign in early SIGHUP signal In the process of starting the osd process,if system just call the logratote("killall -q -1 ceph-mon ceph-mgr ceph-mds ceph-osd ceph-fuse radosgw...") it will cause osd'init failed to start, in addition, osd init slower than before, will increase the chances of the error. Other modules(mon\mds\mgr...) also have type problems, but the most serious osd problem, I can then make other modules similar changes. Fixes: http://tracker.ceph.com/issues/22746 Signed-off-by: huanwen ren --- src/ceph_osd.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ceph_osd.cc b/src/ceph_osd.cc index 4d7daf62d13..c0f661b17f1 100644 --- a/src/ceph_osd.cc +++ b/src/ceph_osd.cc @@ -599,6 +599,10 @@ flushjournal_out: global_init_daemonize(g_ceph_context); common_init_finish(g_ceph_context); + // install signal handlers + init_async_signal_handler(); + register_async_signal_handler(SIGHUP, sighup_handler); + TracepointProvider::initialize(g_ceph_context); TracepointProvider::initialize(g_ceph_context); #ifdef WITH_OSD_INSTRUMENT_FUNCTIONS @@ -658,9 +662,6 @@ flushjournal_out: cephd_preload_rados_classes(osd); #endif - // install signal handlers - init_async_signal_handler(); - register_async_signal_handler(SIGHUP, sighup_handler); register_async_signal_handler_oneshot(SIGINT, handle_osd_signal); register_async_signal_handler_oneshot(SIGTERM, handle_osd_signal); -- 2.47.3