Skip to content

Commit

Permalink
osd: Sign in early SIGHUP signal
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
renhwztetecs committed Jan 22, 2018
1 parent aab2def commit d4421f7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ceph_osd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ int main(int argc, const char **argv)
CODE_ENVIRONMENT_DAEMON,
0, "osd_data");
ceph_heap_profiler_init();

// install signal handlers
init_async_signal_handler();
register_async_signal_handler(SIGHUP, sighup_handler);

// osd specific args
bool mkfs = false;
Expand Down Expand Up @@ -658,9 +662,6 @@ int main(int argc, const char **argv)
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);

Expand Down

0 comments on commit d4421f7

Please sign in to comment.