resolved falls back to a non-preferred name server when the preferred name server appears to be working.

Bug #2008964 reported by Frank Trampe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

This is split from bug #2007728.

On a network with multiple DNS servers provided by DHCP, the "Current DNS Server" shown by `resolvectl status` is sometimes not the first server or even the second server, even when those servers appear to be working (and other hosts continue to use them). This appears to occur on Ubuntu 22.04 but not on Ubuntu 20.04, Ubuntu 18.04, or Windows 10.

RFC 2132 section 3.8 provides that servers are listed in order of preference.

It seems that the correct behavior is that resolved picks as its "Current DNS Server" the first reachable server in the list provided by the DHCP server. The observed behavior is that resolved sometimes picks as its "Current DNS Server" some server other than the first reachable server in the list.

My hypothesis is that there is some name server availability check that is too stringent and that there is no mechanism to retry the preferred server after that check fails. I have not looked at the code or captured packets.

Revision history for this message
Frank Trampe (frank-trampe) wrote :

I was able to reproduce on Ubuntu 20.04 too (by switching the active network interface), so this may not be a recent regression.

Revision history for this message
Nick Rosbrook (enr0n) wrote :

Can you please provide some debug-level logs from systemd-resolved, during a time span where you observe this issue?

You can enable debug-level logging by running `systemctl edit systemd-resolved`, and adding the following:

[Service]
Environment=SYSTEMD_LOG_LEVEL=debug

Changed in systemd (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for systemd (Ubuntu) because there has been no activity for 60 days.]

Changed in systemd (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.