FS#45485 - [dnsmasq] dns resolution fails when using dnsmasq with systemd-resolved

Attached to Project: Arch Linux
Opened by Toke Høiland-Jørgensen (tohojo) - Saturday, 27 June 2015, 16:42 GMT
Last edited by Dave Reisner (falconindy) - Tuesday, 07 July 2015, 20:51 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Dave Reisner (falconindy)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
When using dnsmasq as a local resolver and systemd-networkd as the resolv.conf manager and pointing dnsmasq to a symlinked resolv-file (e.g. /etc/resolv-dnsmasq.conf -> /run/systemd/resolve/resolv.conf), dnsmasq will fail to resolve the symlink if the target file doesn't exist when it starts up. This in turn causes dnsmasq to not correctly setup inotify on the file, and therefore it misses updates to the upstream resolvers.

This can be fixed by making sure dnsmasq always starts after systemd-resolved at boot, by adding 'systemd-resolved.service' to the 'After' stanza in the dnsmasq systemd unit.

Additional info:
* Package version: dnsmasq-2.73-1
* Systemd version: 221

Steps to reproduce:
1. Use systemd-resolved to manage upstream resolvers and dnsmasq as a local resolver.
2. Point dnsmasq's resolv-file to a symlink to /run/systemd/resolve/resolv.conf.
3. Reboot.
4. dnsmasq will fail to discover upstream resolvers and dns resolution is broken.
This task depends upon

Closed by  Dave Reisner (falconindy)
Tuesday, 07 July 2015, 20:51 GMT
Reason for closing:  Upstream
Additional comments about closing:  http://thekelleys.org.uk/gitweb/?p=dnsma sq.git;a=commit;h=362c9303da25640ce8e73e e0b2902005f862c84f will be included with dnsmasq 2.74
Comment by Dave Reisner (falconindy) - Tuesday, 07 July 2015, 20:50 GMT
dnsmasq upstream will fix this, rather than peppering the unit file with dependencies. today it's systemd-resolved, tomorrow it $some_other_resolv_conf_manager.

Loading...