From: huanwen ren Date: Tue, 16 Jan 2018 07:27:56 +0000 (+0800) Subject: osd: Sign in early SIGHUP signal X-Git-Tag: v13.0.2~329^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=da3ba002862bf9074fba99df18dac37e9be9e353;p=ceph.git 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 --- diff --git a/src/ceph_osd.cc b/src/ceph_osd.cc index 4d7daf62d1333..c0f661b17f116 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);