"plugin/auto: no next plugin found" causing apparently erroneous NOERROR logs #6527
-
Hi there! I wasn't sure whether to submit this as a bug report or a discussion question, so I figured I'd start here so as to create less clutter. If you think this represents a genuine bug, I'd be happy to rewrite it with some additional detail as an Issue. We have a CoreDNS server hosting zonefiles using the
On the clientside, this appears to work fine — zonefiles we have are served correctly, and when there is no zonefile for a requested domain it results in a SERVFAIL. However, when there is no zonefile, the from dig client:
in CoreDNS logs:
CoreDNS's behavior, as described in the docs, is that "a nodata response sets the return code to NOERROR", so our dnstap logs reflect such a query as a NOERROR. This makes it difficult to distinguish such responses from genuine NOERROR responses served from our zonefiles, and causes a difference between the response code served to the client (SERVFAIL) and the response code recorded in our logs (NOERROR). Ideally, we want to be able to filter out SERVFAILs in our dnstap collector and only record logs for domains we host. Attempts to resolve this by adding an additional plugin below the For example, a simple solution might be to add a
however this does not work as intended and simply returns all queries as SERVFAILs. Likewise, the As best I can tell, to resolve this issue, we would need to do one of three things:
I haven't been able to find any documentation suggesting any of these are possible. Is there something I'm missing about the way plugin chains work, or a configuration option I've skipped over that might help resolve this problem? Thanks for any help you can provide! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
The response shows a SERVFAIL. SERVFAIL is a response code. This is not a NOERROR response code.
This is a standard DNS thing, not a CoreDNS thing. "nodata" or "NODATA" is a pseudo response code that is actually represented in the DNS protocol as NOERROR response code with an empty answer section. People use the "NODATA" shorthand because it is shorter than saying "NOERROR-with-an-empty-answer-section."
That doesn't work because order of plugin execution is statically defined at compile time - the order that you list different plugins in the configuration does not matter. The template plugin always executes before the auto plugin.
Per your example, it does this already. |
Beta Was this translation helpful? Give feedback.
-
Im a bit unclear on what the issue is. Perhaps if you rephrase this as "what you want to do" rather than "describing the problem" it would be clearer? |
Beta Was this translation helpful? Give feedback.
-
Oh - I think I see... this issue is with the log entry ...
which falsely logs the response code as yes, this appears to be a bug. |
Beta Was this translation helpful? Give feedback.
-
A hacky workaround would be to forward non-existent zones to a local listener that answers with SERVFAIL.
|
Beta Was this translation helpful? Give feedback.
A hacky workaround would be to forward non-existent zones to a local listener that answers with SERVFAIL.