Commit cc7ad970 authored by Vladimír Čunát's avatar Vladimír Čunát Committed by Vladimír Čunát

modules/watchdog: use abort() for restarts

Motivation: core-dump might be very useful, and in this case there
are even very useful pointers on the C stack.
parent 7b7b35bf
Pipeline #54665 canceled with stages
in 20 minutes and 42 seconds
......@@ -17,8 +17,8 @@ answers correctly. To use this feature you must configure DNS name and type to q
Each single query from watchdog must result in answer with
RCODE = NOERROR or NXDOMAIN. Any other result will terminate the resolver
(with exit code 69) to allow the supervisor process to do cleanup and restart
the resolver.
(with SIGABRT) to allow the supervisor process to do cleanup, gather coredump
and restart the resolver.
It is recommended to use a name with a very short TTL to make sure the watchdog
is testing all parts of resolver and not only its cache. Obviously this check
......@@ -3,6 +3,7 @@ local ffi = require('ffi')
int sd_watchdog_enabled(int unset_environment, uint64_t *usec);
int sd_notify(int unset_environment, const char *state);
void abort(void);
local watchdog = {}
......@@ -13,8 +14,8 @@ local function sd_signal_ok()
function private.fail_callback()
log('[watchdog] TERMINATING resolver, supervisor is expected to restart it')
os.exit(69) -- unclean exit code = EX_UNAVAILABLE
log('[watchdog] ABORTING resolver, supervisor is expected to restart it')
-- logging
......@@ -14,7 +14,6 @@ ExecStart=@sbin_dir@/kresd --config=@etc_dir@/kresd.conf
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment