cloudfoundry / bosh-dns-release

BOSH DNS release
Apache License 2.0
18 stars 36 forks source link

Log recurser errors at log level WARN #60

Closed beyhan closed 4 years ago

beyhan commented 4 years ago

All failing recursor request are logged at DEBUG level at the moment: https://github.com/cloudfoundry/bosh-dns-release/blob/8ba02f20f7df86d0c0e9e0bfcb6eecae011142cb/src/bosh-dns/dns/server/handlers/forward_handler.go#L80

Most probably it's ok to log at DEBUG level requests, where the recursor answered but the answer return code is different than success: https://github.com/cloudfoundry/bosh-dns-release/blob/8ba02f20f7df86d0c0e9e0bfcb6eecae011142cb/src/bosh-dns/dns/server/handlers/forward_handler.go#L64-L67 Example for a request where the recursor responded but answer is not successful:

DEBUG - error recursing to "<recursor>:53": received NXDOMAIN for <domain> from upstream (recursor: <recursor>:53)
DEBUG - handlers.ForwardHandler Request id=58360 qtype=[A] qname=[<domain>] rcode=NXDOMAIN ancount=0 error=[no response from recursors] time=24593142ns

Requests where the recursor failed to answer the query should be logged at log level WARN because it is an error situation for a recursor. Example for a request where the recursor failed to answer:

DEBUG - error recursing to "<recursor>:53": read udp <ip>:52995-><recursor>:53: i/o timeout
DEBUG - handlers.ForwardHandler Request id=54868 qtype=[A] qname=[<domain>] rcode=NXDOMAIN ancount=0 error=[no response from recursors] time=2000304764ns
cf-gitbot commented 4 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/173060154

The labels on this github issue will be updated when the story is started.

aashah commented 4 years ago

@beyhan Can we close this issue out?

beyhan commented 4 years ago

issue has been fixed with pull-request #61