resolv.conf for resolved stub server should have a comment how to see the actual servers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| network-manager (Ubuntu) |
Undecided
|
Steve Langasek | ||
| resolvconf (Ubuntu) |
Low
|
Steve Langasek |
Bug Description
resolv.conf currently just has
nameserver 127.0.0.53
with resolved (its local stub resolver). We should have an extra comment on top of that that says
# systemd-resolved stub resolver; run "systemd-resolve --status" to see the actual name servers
Changed in systemd (Ubuntu): | |
status: | New → In Progress |
importance: | Undecided → Low |
milestone: | none → ubuntu-16.11 |
assignee: | nobody → Martin Pitt (pitti) |
Thomas Hood (jdthood) wrote : | #2 |
If such a comment were to be added then in order not to mislead it would have to take into account the configurability of various components. So you'd have to say something like:
«If the line "nameserver 127.0.0.53" is present then it probably refers to the systemd resolver listening on the loopback address. By default the systemd resolver is also configured to handle name queries via the Name Service Switch whose configuration file is nsswitch.conf. The name servers to which the systemd resolver forwards queries can be discovered by running "systemd-resolve --status".»
What would be far better, though, is to include a text file or manpage explaining how name service currently works in Ubuntu. (Actually we should have done this long ago.) The file could include the previous paragraph but would also talk about resolvconf and NetworkManager and its plugins. The name of this file could then be mentioned in the header that resolvconf writes into resolv.conf. /etc/resolvconf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# For more info see /usr/share/
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
Martin Pitt (pitti) wrote : | #3 |
Right, the comment would need to be conditional. My original naïve approach was to add the comment together with the nameserver, such as
printf "# Run systemd-resolve --status blabla\nnameserver 127.0.0.53\n" | /sbin/resolvconf -a systemd-resolved
so that the comment would only be there when appropriate and would also be at the appropriate line.
manpage> Not sure if that really helps -- this would also have to contain a lot of "if"s, like "if you have resolved/
(FTR, there is nothing Ubuntu specific here, it's the same in Debian and any other Linux)
Thomas Hood (jdthood) wrote : | #4 |
Right, I think the file should only document the Ubuntu-specific things such as the facts that by default resolvconf and the systemd resolver are used, NetworkManager is used by default on Desktop and ifup on Server, and so on. There have been hundreds of questions about these basic things on AskUbuntu and the forums over the years. I have often referred people to Stephane Graber's blog post (https:/
Steve Langasek (vorlon) wrote : Re: [Bug 1638836] Re: resolv.conf for resolved stub server should have a comment how to see the actual servers | #5 |
On Fri, Nov 04, 2016 at 11:53:11AM -0000, Thomas Hood wrote:
> What would be far better, though, is to include a text file or manpage
> explaining how name service currently works in Ubuntu.
That doesn't help the problem that /etc/resolv.conf is the file that the
experienced admin expects to contain the nameservers' addresses.
> # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
> # For more info see /usr/share/
> # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
The admin is not going to follow documentation links for the thing that
"should" be working the way it always worked and that Ubuntu has broken.
Documentation is what you look for when you're looking to understand
something new, not to understand why Ubuntu has become buggy and annoying.
This text should go directly in /etc/resolv.conf.
Changed in resolvconf (Ubuntu): | |
assignee: | Martin Pitt (pitti) → Canonical Foundations Team (canonical-foundations) |
milestone: | ubuntu-16.11 → ubuntu-16.12 |
Changed in resolvconf (Ubuntu): | |
assignee: | Canonical Foundations Team (canonical-foundations) → Steve Langasek (vorlon) |
Steve Langasek (vorlon) wrote : | #6 |
I have a fix for resolvconf here, but it's inaccurate for the desktop because Network Manager is still doing dnsmasq by default. Opening a task for NM.
Changed in network-manager (Ubuntu): | |
status: | New → Triaged |
assignee: | nobody → Canonical Foundations Team (canonical-foundations) |
Changed in network-manager (Ubuntu): | |
assignee: | Canonical Foundations Team (canonical-foundations) → Steve Langasek (vorlon) |
Martin Pitt (pitti) wrote : | #7 |
https:/
This is also the reason why I didn't do this comment change yet, I think it's better to wait for the above.
Launchpad Janitor (janitor) wrote : | #8 |
This bug was fixed in the package resolvconf - 1.79ubuntu2
---------------
resolvconf (1.79ubuntu2) zesty; urgency=medium
* etc/resolvconf/
'systemd-
but the most unusual configurations, and expert users should be given
guidance where to find the actual nameservers for debugging purposes.
LP: #1638836.
-- Steve Langasek <email address hidden> Mon, 28 Nov 2016 15:39:18 -0800
Changed in resolvconf (Ubuntu): | |
status: | In Progress → Fix Released |
Launchpad Janitor (janitor) wrote : | #9 |
This bug was fixed in the package network-manager - 1.4.2-2ubuntu4
---------------
network-manager (1.4.2-2ubuntu4) zesty; urgency=medium
[ Martin Pitt ]
* Add resolved DNS plugin (backported from upstream master).
* Disable resolvconf support.
This is broken with DNS plugins other than "dnsmasq" -- it still writes
127.0.1.1 into resolvconf as a nameserver, but this does not exist any more and
will also shadow resolved's stub server on 127.0.0.53.
This ought to be fixed more properly in the future.
[ Steve Langasek ]
* Re-drop dnsmasq in zesty, in favor of systemd-resolved.
This unifies DNS lookups between Ubuntu desktop and server.
But don't Recommend libnss-resolve, because the local resolver + libnss_dns.so
should suffice for all uses and the resolved nss module is unnecessary added
complexity.
We need to specify "dns=systemd-
/etc/
systemd-
separate conf.d file in /usr to avoid unnecessary conffile prompts in the
future. The user can still override it in /etc. (LP: #1638836)
-- Martin Pitt <email address hidden> Fri, 02 Dec 2016 09:36:02 +0100
Changed in network-manager (Ubuntu): | |
status: | Triaged → Fix Released |
Harry (harry33) wrote : | #10 |
Martin,
Please note, that in my setup, the network is lost immediately after rebooting with the new network-manager (1.4.2-2ubuntu4). Then, downgrading back to version 1.4.2.-2ubuntu3, and rebooting, I get network back.
In both of these versions, the network-manager creates the same kind of file /etc/resol.vconf.
I only use a cable network. I do not have the package resolvconf installed, as no other package depends on it (isc-dhcp-client merely suggests it).
Martin Pitt (pitti) wrote : | #11 |
Hello Harry,
Harry [2016-12-03 15:02 -0000]:
> Please note, that in my setup, the network is lost immediately after
> rebooting with the new network-manager (1.4.2-2ubuntu4).
Thanks for filing bug 1647133, tracking that issue there.
Turns out that resolvconf always filters out comments, so the only way to get a comment in there is via /etc/resolvconf /resolv. conf.d/ head. So moving package.