-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tune DNS return code when DC does not exists #8102
Labels
theme/dns
Using Consul as a DNS provider, DNS related issues
type/enhancement
Proposed improvement or new feature
Comments
pierresouchay
added a commit
to pierresouchay/consul
that referenced
this issue
Jun 15, 2020
This will allow to increase cache value when DC is not valid (aka return SOA to avoid too many consecutive requests) and will distinguish DC being temporarily not available from DC not existing. Implements hashicorp#8102
dnephin
added
theme/dns
Using Consul as a DNS provider, DNS related issues
type/enhancement
Proposed improvement or new feature
labels
Jun 15, 2020
mkeeler
pushed a commit
that referenced
this issue
Jun 22, 2020
This will allow to increase cache value when DC is not valid (aka return SOA to avoid too many consecutive requests) and will distinguish DC being temporarily not available from DC not existing. Implements #8102
hashicorp-ci
pushed a commit
that referenced
this issue
Jun 22, 2020
This will allow to increase cache value when DC is not valid (aka return SOA to avoid too many consecutive requests) and will distinguish DC being temporarily not available from DC not existing. Implements #8102
Implemented in #8103 |
Hi @pierresouchay - Since this has been implemented, I will go ahead and close this issue :) Feel free to comment if it needs reopening. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
theme/dns
Using Consul as a DNS provider, DNS related issues
type/enhancement
Proposed improvement or new feature
Feature Description
For now, DNS returns SERVFAIL if datacenter is not available or if it does not exists. We would like to propose to return NXDOMAIN (RCODE: 3) when datacenter does not exist and keep SERVFAIL if DC exists and cannot be reached.
Use Case(s)
The DNS servers caching queries might use this information to keep track of queries constantly failing and have different behavior for those errors.
Implementation
This information might be already available since we know can find if the DC does exists or not: https://github.com/hashicorp/consul/blob/master/agent/consul/rpc.go#L607 since be50400 has been merged.
So, DNS server would only have to check for:
ErrDCNotAvailable
and returnSERVFAIL
(current case)ErrNoDCPath
returnNXDOMAIN
The text was updated successfully, but these errors were encountered: