Skip to content

Current DNS resolver selection erratic #25020

Closed

Description

@schanzen

systemd version the issue has been seen with

251

Used distribution

Fedora 37

Linux kernel version used

5.19.14-300.fc37.x86_64

CPU architectures issue was seen on

x86_64

Component

systemd-resolved

Expected behaviour you didn't see

I expect that when I set DNS server for an interface that there is some kind of understandable precedence wrt which one is picked as "Current DNS Server".
For example, when I set

# resolvectl dns $INTERFACE $MY_RESOLVER 9.9.9.9

then I expect that resolvectl query first tries $MY_RESOLVER and then if that fails 9.9.9.9.
Whatever works will then become "Current DNS Server". This behavior is expected to be consistent across outages of both DNS servers

Unexpected behaviour you saw

When $MY_RESOLVER is down when a DNS query happens, 9.9.9.9 is promoted to "Current DNS Server" practically forever (as it is "more available" than my preference, $MY_RESOLVER).
But, I want my system to always try $MY_RESOLVER first!

Steps to reproduce the problem

  1. Configure two DNS servers using resolvectl
  2. Make the "first"/leftmost unavailable
  3. Resolve a name, see the other DNS server getting used and promoted
  4. Make the "first" server reachable again
  5. Resolve a name, see that the other DNS server is still set as active/current DNS server

Additional program output to the terminal or log subsystem illustrating the issue

No response

Activity

  1. added
    bug 🐛
    on Oct 16, 2022
  2. poettering commented on Oct 20, 2022

    @poettering
    Member

    resolved is not "erratic" in its use of DNS servers, it just sticks to the server that works instead of starting from the first time on every single lookup, since thta would be needlessly slow as we we'd then have to learn each time what it can and can't do and whether it responds/times out at all...

  3. poettering commented on Oct 20, 2022

    @poettering
    Member

    Closing as duplicate of #5755, under the assumption you are looking for a dumber mode of operation where it forgets what it learned each time and begins from the top of the list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛resolve

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions