]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Sign in early SIGHUP signal
authorhuanwen ren <ren.huanwen@zte.com.cn>
Tue, 16 Jan 2018 07:27:56 +0000 (15:27 +0800)
committerhuanwen ren <ren.huanwen@zte.com.cn>
Thu, 25 Jan 2018 01:00:31 +0000 (09:00 +0800)
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 <ren.huanwen@zte.com.cn>
src/ceph_osd.cc

index 4d7daf62d133366a0396258d374613a3f9b3ec80..c0f661b17f116f418e2c225d9f7aea1cf4ce311b 100644 (file)
@@ -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<osd_tracepoint_traits>(g_ceph_context);
   TracepointProvider::initialize<os_tracepoint_traits>(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);