Skip to content
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

Closed
pierresouchay opened this issue Jun 15, 2020 · 2 comments
Closed

Tune DNS return code when DC does not exists #8102

pierresouchay opened this issue Jun 15, 2020 · 2 comments
Labels
theme/dns Using Consul as a DNS provider, DNS related issues type/enhancement Proposed improvement or new feature

Comments

@pierresouchay
Copy link
Contributor

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 return SERVFAIL (current case)
  • ErrNoDCPath return NXDOMAIN
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 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
@pierresouchay
Copy link
Contributor Author

Implemented in #8103

@jsosulska
Copy link
Contributor

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
Projects
None yet
Development

No branches or pull requests

3 participants