<p dir="ltr">Hi, </p>
<p dir="ltr">On my phone and travelling so can't trivially find out the answer to the following question right now. </p>
<p dir="ltr">Is libnss-resolve automatically seeded via a Depends or does it require manual seeding? </p>
<p dir="ltr">Regards, Martin. </p>
<div class="gmail_quote">On 31 May 2016 11:36, "Martin Pitt" <<a href="mailto:martin.pitt@ubuntu.com">martin.pitt@ubuntu.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello all,<br>
<br>
yesterday I landed [1] in Yakkety which changes how DNS resolution<br>
works -- i. e. how names like "<a href="http://www.ubuntu.com" rel="noreferrer" target="_blank">www.ubuntu.com</a>" get translated to an IP<br>
address like 1.2.3.4.<br>
<br>
Until now, we used two different approaches for this:<br>
<br>
 * On desktops and touch, NetworkManager launched "dnsmasq" configured<br>
   as effectively a local DNS server which forwards requests to the<br>
   "real" DNS servers that get picked up usually via DHCP. Thus<br>
   /etc/resolv.conf said "nameserver 127.0.0.1" and it was rather<br>
   non-obvious to show the real DNS servers. (This was one of the<br>
   complaints/triggers that led to creating this blueprint).  But<br>
   dnsmasq does proper rotation and fallback between multiple<br>
   nameservers, i. e. if one does not respond it uses the next one<br>
   without long timeouts.<br>
<br>
 * On servers, cloud images etc. we did not have any local DNS server.<br>
   Configured DNS servers (via DHCP or static configuration in<br>
   /etc/network/interfaces) were put into /etc/resolv.conf, and<br>
   every program (via glibc's builtin resolver) directly contacted<br>
   those.<br>
<br>
   This had the major drawback that if the first DNS server does not<br>
   respond (or is slow), then *every* DNS lookup suffers from a ~ 10s<br>
   timeout, which makes every network operation awfully slow.<br>
   Addressing this was the main motivation for the blueprint. On top<br>
   of that, there was no local caching, thus requesting the same name<br>
   again would do another lookup.<br>
<br>
As of today, we now have one local resolver service for all Ubuntu<br>
products; we picked "resolved" as that is small and lightweight,<br>
already present (part of the systemd package), does not require D-Bus<br>
(unlike dnsmasq), supports DNSSEC, provides transparent fallback to<br>
contacting the real DNS servers directly (in case anything goes wrong<br>
with the local resolver), and avoids the first issue above that<br>
/etc/resolv.conf always shows 127.0.0.1.<br>
<br>
Now DNS resolution goes via a new "libnss-resolve" NSS module which<br>
talks to resolved [2]. /etc/resolv.conf has the "real" nameservers,<br>
broken name servers are handled efficiently, and we have local DNS<br>
caching. NetworkManager now stops launching a dnsmasq instance.<br>
<br>
I've had this running on my laptop for about three weeks now without<br>
noticing problems, but there may well be some corner cases where this<br>
causes problems. If you encounter a regression that causes DNS names<br>
to not get resolved correctly, please do "ubuntu-bug libnss-resolve"<br>
with the details.<br>
<br>
Thanks,<br>
<br>
Martin<br>
<br>
[1] <a href="https://blueprints.launchpad.net/ubuntu/+spec/foundations-y-local-resolver" rel="noreferrer" target="_blank">https://blueprints.launchpad.net/ubuntu/+spec/foundations-y-local-resolver</a><br>
[2] This is configured in /etc/nsswitch.conf ("hosts: files ... resolve dns")<br>
--<br>
Martin Pitt                        | <a href="http://www.piware.de" rel="noreferrer" target="_blank">http://www.piware.de</a><br>
Ubuntu Developer (<a href="http://www.ubuntu.com" rel="noreferrer" target="_blank">www.ubuntu.com</a>)  | Debian Developer  (<a href="http://www.debian.org" rel="noreferrer" target="_blank">www.debian.org</a>)<br>
<br>--<br>
ubuntu-devel mailing list<br>
<a href="mailto:ubuntu-devel@lists.ubuntu.com">ubuntu-devel@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel</a><br>
<br></blockquote></div>