Installing resolvconf causes loss of manually entered nameserver information in resolv.conf
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
resolvconf (Ubuntu) |
Fix Released
|
Critical
|
Steve Langasek | ||
Precise |
Fix Released
|
Critical
|
Steve Langasek |
Bug Description
Release: Precise
Architecture: amd64
This is something I noticed when recently doing updates on my Precise test server. Before I had set up a /etc/resolv.conf (cannot remember when but maybe the installer did) so it would point to the correct nameserver and search list(s). And that was left alone all the time (on a server installation). But the recent update to resolvconf changed that and the dns configuration was dropped (because the static ip setup in /etc/network/
Now this is simple to fix by adding dns-nameserver and dns-search to the interfaces file, but (assuming many servers have a static ip setup and not dhcp) could cause a lot of fallout for upgrades.
Changed in resolvconf (Ubuntu): | |
importance: | Undecided → High |
Changed in resolvconf (Ubuntu Precise): | |
assignee: | nobody → Canonical Foundations Team (canonical-foundations) |
Changed in resolvconf (Ubuntu Precise): | |
status: | Confirmed → Triaged |
Changed in resolvconf (Ubuntu Precise): | |
status: | Triaged → In Progress |
summary: |
- New resolver package overwrites manually created resolv.conf on server + Installing resolvconf causes loss of manually entered nameserver + information in resolv.conf |
Changed in resolvconf (Ubuntu Precise): | |
status: | In Progress → Fix Committed |
This has always been a shortcoming in the resolvconf package: it does not do a fully automatic installation. The case Stefan Bader describes in this report is the most important lacuna: the package does not add information to /etc/network/ interfaces.
Until now we have dealt with this by adding warnings to the README and to the package description
This package may require some manual configuration.
Please read the README file for detailed instructions.
and by implementing the feature described in the following debconf template.
=== BEGIN === link-tail- to-original interfaces. For more interfaces has been edited and the affected /resolv. conf.d/ tail to f/resolv. conf.d/ original. This will cause the whole of interfaces, the /etc/resolvconf /resolv. conf.d/ tail link
Template: resolvconf/
Type: boolean
Default: false
_Description: Append original file to dynamic file?
If the original static resolver configuration file (/etc/resolv.conf)
contains name server addresses, those addresses should be listed on
"dns-nameservers" lines in /etc/network/
information, please consult the resolvconf(8) man page and the
README file.
.
Until /etc/network/
interfaces brought down and up again, the name server addresses will
not be included in the dynamically generated resolver configuration
file.
.
If you choose this option, a temporary workaround will be put in
place: a symbolic link will be created (if it does not already exist)
from /etc/resolvconf
/etc/resolvcon
that original resolver configuration file to be appended to the
dynamically generated file.
.
After the required "dns-nameservers" lines have been added to
/etc/network/
should be replaced by one to /dev/null.
=== END ===
The link-tail- to-original feature is very unsatisfactory. It was only implemented because implementing anything better is difficult... and it's almost impossible to implement a fully automated installation which will never make a mistake.
The problem is: when the resolvconf package is installed it isn't easy to tell where the information from /etc/resolv.conf belongs in the resolvconf scheme of things. Figuring this out takes some work. Confronted with an existing /etc/resolv.conf with "nameserver 1.2.3.4", the maintainer script has to figure out what interface this is associated with, what tool configured that interface, (in the case of ifupdown:) what logical interface was used, etc.
We should at least be able to provide the admin with an interactive program that assists her in moving info from /etc/resolv.conf to /etc/network/ interfaces.