Commit b36bc1f5 authored by Petr Špaček's avatar Petr Špaček

Merge branch 'watchdog-details' into 'master'

watchdog details

See merge request !881
parents 7b7b35bf cc7ad970
Pipeline #55401 failed with stages
in 110 minutes and 43 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')
ffi.cdef([[
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()
end
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')
ffi.C.abort()
end
-- logging
......
......@@ -14,7 +14,6 @@ ExecStart=@sbin_dir@/kresd --config=@etc_dir@/kresd.conf
User=@user@
TimeoutStopSec=10s
WatchdogSec=10s
RestartForceExitStatus=69
Restart=on-abnormal
LimitNOFILE=1048576
Sockets=kresd.socket
......
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