Bug 79672

Summary: systemd-resolved 213 adds extra dns servers even when dns from dhcp is supplied
Product: systemd Reporter: Radek Podgorny <radek>
Component: generalAssignee: systemd-bugs
Status: RESOLVED FIXED QA Contact: systemd-bugs
Severity: normal    
Priority: medium CC: dirocco.nico
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Radek Podgorny 2014-06-05 08:18:06 UTC
...which is wrong. the default behaviour should be to add default set of servers only when no dns is specified (either static or via dhcp).

it the current state, extra (and unwanted) servers are being added despite nameservers from dhcp are received and processed correctly. this breaks some setups since the local (dhcp supplied) nameservers are set to answer local-scope queries but google's servers are not.

please fix the default behaviour.

thank you.
Comment 1 Tom Gundersen 2014-07-01 11:35:20 UTC
Could you explain your usecase a bit more? Currently the globally configured servers are only added as fallback, so your queries should first got to your local servers, and only hit the global ones if those fail.

Is the issue that you _want_ some queries to fail? Note that you can Set "DNS=" in resolved.conf to not get any global servers at all. Would that work for you?
Comment 2 Radek Podgorny 2014-07-01 23:33:55 UTC
yes, setting DNS= is what i've been using so far to work-around it but it simply feels wrong.

when my network is configured correctly (dhcp sending resolvers), i see no reason to add arbitrary (why google's 8.8.8.8?) servers to resolv.conf. also, when something breaks, i think it would be better to get to notice as soon as possible instead of having seemingly weird behaviour (1).

as for the "fallback", the resolv.conf also supports the 'rotate' option (see man resolv.conf) which changes the behaviour to be round-robin. i can't even imagine how stressful debugging broken resolver would be in such case.

i totally understand having sane defaults for non-auto-configured systems (virtual machines, ...) but let's not interfere with centrally driven network configuration (dhcp).

(1): as an example: windows machines would stop working but linux one won't. or even better, some linux machines will fail because they're not systemd-based. also, ever more delicate things may start to happen (dnssec, site-local resolution, ...).
Comment 3 Lennart Poettering 2014-08-18 22:09:56 UTC
Fixed in current git.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.