These are chat archives for CZ-NIC/knot-resolver

20th
Apr 2018
heximcz
@heximcz
Apr 20 2018 07:36

Hi, Im new in kresd. My question is: Why I have a lot of messages in log this type?:

Apr 20 09:16:49 rdns1 kresd[2114]: [     ][stal]   => no reachable NS, using stale data
Apr 20 09:16:49 rdns1 kresd[2114]: [     ][stal]   => no reachable NS, using stale data
Apr 20 09:16:49 rdns1 kresd[2114]: [     ][stal]   => no reachable NS, using stale data
Apr 20 09:16:49 rdns1 kresd[2114]: [     ][stal]   => no reachable NS, using stale data
Apr 20 09:16:49 rdns1 kresd[2114]: [     ][stal]   => no reachable NS, using stale data
Apr 20 09:16:49 rdns1 kresd[2114]: [     ][stal]   => no reachable NS, using stale data
Apr 20 09:16:49 rdns1 kresd[2114]: [     ][stal]   => no reachable NS, using stale data
Apr 20 09:16:49 rdns1 kresd[2114]: [     ][stal]   => no reachable NS, using stale data

Thank you.

Vladimír Čunát
@vcunat
Apr 20 2018 08:44
@heximcz: it's because all NS servers for some name are classified as unreachable. The serve_stale module prints this information.
It was really only intended to be printed in --verbose mode, but I see it's always printed.
The reason for the classification is typically repeated failure to reply, and the state is cached for some short time.
heximcz
@heximcz
Apr 20 2018 09:34
@vcunat thank you. Is possible move this message to the --verbose only ?
Vladimír Čunát
@vcunat
Apr 20 2018 09:35
Yes, that's my plan, but we probably won't get to it today.
Vladimír Čunát
@vcunat
Apr 20 2018 09:42
@heximcz: as a quick workaround you may simply remove the line that prints this - it's simple lua source code in $PREFIX/lib/kdns_modules/serve_stale.lua
heximcz
@heximcz
Apr 20 2018 09:45
@vcunat thank you, I'll wait for the new version. it is not limiting. It only fills the syslog.
Petr Špaček
@pspacek
Apr 20 2018 10:48
@heximcz Can you try following patch?
diff --git a/modules/serve_stale/serve_stale.lua b/modules/serve_stale/serve_stale.lua
index dfe20a1a..cf19be17 100644
--- a/modules/serve_stale/serve_stale.lua
+++ b/modules/serve_stale/serve_stale.lua
@@ -27,7 +27,9 @@ M.layer = {
                local now = ffi.C.kr_now()
                local deadline = qry.creation_time_mono + M.timeout
                if now > deadline or qry.flags.NO_NS_FOUND then
-                       log('[     ][stal]   => no reachable NS, using stale data')
+                       if verbose() then
+                               log('[     ][stal]   => no reachable NS, using stale data')
+                       end
                        qry.stale_cb = M.callback
                        -- TODO: probably start the same request that doesn't stale-serve,
                        -- but first we need some detection of non-interactive / internal requests.
heximcz
@heximcz
Apr 20 2018 14:05
@pspacek Thank you. Tested and working fine. I try verbose too.
Petr Špaček
@pspacek
Apr 20 2018 15:19
@heximcz Perfect, I'm going to merge this fix now: https://gitlab.labs.nic.cz/knot/knot-resolver/merge_requests/564
Petr Špaček
@pspacek
Apr 20 2018 15:27
@heximcz Merged. Thank you for cooperation!
heximcz
@heximcz
Apr 20 2018 15:28
@pspacek you are welcome
Petr Špaček
@pspacek
Apr 20 2018 15:40
You can look forward to release on Monday (hopefully).