Skip to content

Tune DNS return code when DC does not exists #8102

@pierresouchay

Description

@pierresouchay

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    theme/dnsUsing Consul as a DNS provider, DNS related issuestype/enhancementProposed improvement or new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions