mirror of
https://github.com/ceph/ceph
synced 2024-12-17 08:57:28 +00:00
osd: install async signal handlers after init()
The orderly shutdown in OSD assumes init() has completed. Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
73b4003f65
commit
61a298c39c
@ -451,12 +451,6 @@ int main(int argc, const char **argv)
|
|||||||
messenger_hb_back_server->start();
|
messenger_hb_back_server->start();
|
||||||
cluster_messenger->start();
|
cluster_messenger->start();
|
||||||
|
|
||||||
// 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);
|
|
||||||
|
|
||||||
// start osd
|
// start osd
|
||||||
err = osd->init();
|
err = osd->init();
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
@ -465,6 +459,12 @@ int main(int argc, const char **argv)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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);
|
||||||
|
|
||||||
client_messenger->wait();
|
client_messenger->wait();
|
||||||
messenger_hbclient->wait();
|
messenger_hbclient->wait();
|
||||||
messenger_hb_front_server->wait();
|
messenger_hb_front_server->wait();
|
||||||
|
Loading…
Reference in New Issue
Block a user