Commit Graph

266 Commits

Author SHA1 Message Date
Zaiming Shi 032a49114c fix(emqx_machine): start terminator in emqx_machine_app 2021-08-06 12:16:15 +02:00
Zaiming Shi 5063d3a2b3 fix(emqx_machine): ensure digraph is deleted after use
also add tests
2021-08-06 12:16:10 +02:00
Zaiming Shi 75f9741d75 fix(terminator): ensure erl_signal_server init:stop
ensure init:stop can be triggered by kill signal even before the
terminator is ready
2021-08-06 11:10:16 +02:00
Zaiming Shi 304b322a0c fix(emqx_machine): handle early shutdown 2021-08-06 10:20:42 +02:00
Zaiming Shi 81c9dcb6ae refactor(emqx_machine_terminator): future-proof try-catch
Ensure exceptions in emqx_machine:stop_apps/0 is caught
and call init:stop/0 in the after clause
2021-08-06 08:51:48 +02:00
Zaiming Shi 044e084698 feat(emqx_machine): ignore sighup, ensure sigterm 2021-08-06 08:46:07 +02:00
Zaiming Shi 85f8ba10ce fix(emqx_machine_signal_handler): ignore unknown info 2021-08-06 08:21:06 +02:00
Zaiming Shi bee8f01ee8 feat(emqx_machine): add a kill signal handler
Now the signal from kill PID can also be handled gracefully
2021-08-06 02:12:21 +02:00
Zaiming Shi 4025d31295 refactor(emqx_machine): move code from _app module to to emqx_machine 2021-08-05 14:30:59 +02:00
Zaiming Shi bc23ff5e47 feat: add graceful shutdown
prior to this cahnge emqx node shutdown is done by init:stop
which might have undesired stop order of the applications

in this change, emqx_machine_terminator is added to stop apps
in defined order and then terminate the node in infinite loop
2021-08-05 14:11:58 +02:00
Zaiming Shi ce24696329 refactor(emqx_app): start quic listener condition
when the app is present, and when listners are configured
2021-08-05 12:58:03 +02:00
Zaiming Shi e6232665a3 refactor(emqx): ensure app shutdown and reboot order
make use of application dependency to ensure start order.
also the same dependency top-sorted for shutdown and reboot order
2021-08-04 08:40:03 +02:00
Zaiming Shi e6907478ba test: move emqx_global_gc_SUITE to emqx_machine app 2021-08-04 08:36:10 +02:00
Zaiming Shi 5b5006e8ab refactor(emqx_sup): move global gc to emqx_machine app 2021-08-04 08:36:10 +02:00
Zaiming Shi 522d8e0a4a refactor(config): split config and schema 2021-08-04 08:36:10 +02:00
Zaiming Shi 4bbd398550 refactor(emqx): create emqx_machine app 2021-08-04 08:36:10 +02:00