[Bug 1000244] Re: /etc/resolv.conf symlink does not exist after initial installation of resolvconf package
Thomas Hood
1000244 at bugs.launchpad.net
Mon Dec 3 09:52:47 UTC 2012
@Bob: Thanks for the information. Interesting case.
* /etc/resolv.conf is not a symbolic link to ../run/resolvconf/resolv.conf
* Updates are not enabled
* A postponed update has been scheduled
* Nothing has been stored in the "interfaces" database
I can only guess how this set of conditions came about. One possibility
is that the postinst failed to run or aborted early and then "resolvconf
-u" was run by something.
It would be nice if we knew the (original) answer to the "linkify-
resolvconf" debconf question; then we could easily rule out the
possibility that linkification (that is, creation of the symbolic link
/etc/resolv.conf -> ../run/resolvconf/resolv.conf) failed to occur
because the answer was negative. But it is impossible to know this after
the fact since the Ubuntu version of the postinst overwrites the
original answer. This should be fixed. I'll file a separate report about
this.
Another source of uncertainty is the "invoke-rc.d resolvconf start" code
added to the beginning of the postinst by dh_installinit. In the Debian
version of the package, dh_installinit is run with the --no-start option
and actions equivalent to "invoke-rc.d resolvconf start" are performed
later in the postinst after necessary preparation has been done. That
works correctly. While converting from sysvinit to Upstart the Ubuntu
developers replaced "--no-start" with the "-r" option but a few things
have gone wrong in the process.
First, the "#DEBHELPER#" token is in the wrong place. It should be
placed after the postinst code that linkifies and initializes the
database. Hmm. This bug was fixed at one point as indicated by the
following changelog entry
- Move the #DEBHELPER# token in debian/postinst to after the resolv.conf
symlink is set, so the init script can actually start (since it expects
/etc/resolv.conf to be a symlink).
but the current version has the "#DEBHELPER#" token back up at the top
of the file. I will file a separate report about this.
Second, the comment in the postinst still says that "--no-start" is
used. I will mention this in the latter report.
Third, dh_installinit inserts code in the postinst that does
invoke-rc.d resolvconf start || exit $?
This calls invoke-rc.d which calls /etc/init.d/resolvconf which is
/lib/init/upstart-job which runs "resolvconf --enable-updates" which
runs the resolvconf update scripts. If any of the scripts returns an
error then the postinst exits at the line quoted above — before
linkification has been done. This is very undesirable. This would also
be fixed if the "#DEBCONF#" token were in the right place, at the bottom
of the postinst.
So to conclude, I can only guess about what happened in your case but
your information has led to the discovery of at least one bug that might
well be involved. :)
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to resolvconf in Ubuntu.
https://bugs.launchpad.net/bugs/1000244
Title:
/etc/resolv.conf symlink does not exist after initial installation of
resolvconf package
Status in “resolvconf” package in Ubuntu:
Incomplete
Bug description:
I upgraded an 11.10 install to 12.04, and now I'm unable to resolve
domain names because Network Manager does not populate my
/etc/resolv.conf file.
For example, my local wireless router uses the domain "mylocaldomain"
and nameservers 10.157.10.12 and 10.157.10.14, so in 11.10, after
connecting to the router I would see this in my /etc/resolv.conf:
domain mylocaldomain
search mylocaldomain
nameserver 10.157.10.12
nameserver 10.157.10.14
Now /etc/resolv.conf contains the settings last set before I upgraded
to 12.04, and doesn't update them for whatever network I'm currently
on. I have to manually guess the settings and modify /etc/resolv.conf
in order to resolve domain names.
I believe this may be related to
https://bugs.launchpad.net/ubuntu/+source/resolvconf/+bug/922677 and
how the "resolvconf" program has been introduce to manage this. I
believe this is a new bug with how prior installs are improperly
upgraded.
I tried removing the line "dns=dnsmasq" from
/etc/NetworkManager/NetworkManager.conf and then running `sudo restart
network-manager`, but that had no effect.
I tried running `resolvconf --enable-updates` but I get the error
"resolvconf: Error: /etc/resolv.conf isn't a symlink, not doing
anything."
Based on https://help.ubuntu.com/12.04/serverguide/network-
configuration.html#name-resolution, I tried establishing this symlink
myself, but the file /run/resolvconf/resolv.conf does not exist on my
system.
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: network-manager 0.9.4.0-0ubuntu4
ProcVersionSignature: Ubuntu 3.2.0-24.37-generic 3.2.14
Uname: Linux 3.2.0-24-generic x86_64
NonfreeKernelModules: nvidia wl
ApportVersion: 2.0.1-0ubuntu7
Architecture: amd64
CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found.
Date: Wed May 16 09:57:25 2012
IfupdownConfig:
auto lo
iface lo inet loopback
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64+mac (20111012)
IpRoute:
default via 192.168.1.1 dev eth2 proto static
169.254.0.0/16 dev eth2 scope link metric 1000
192.168.1.0/24 dev eth2 proto kernel scope link src 192.168.1.205 metric 2
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1
NetworkManager.state:
[main]
NetworkingEnabled=true
WirelessEnabled=true
WWANEnabled=true
WimaxEnabled=true
SourcePackage: network-manager
UpgradeStatus: Upgraded to precise on 2012-05-10 (5 days ago)
nmcli-dev:
DEVICE TYPE STATE DBUS-PATH
eth2 802-11-wireless connected /org/freedesktop/NetworkManager/Devices/1
eth0 802-3-ethernet unavailable /org/freedesktop/NetworkManager/Devices/0
nmcli-nm:
RUNNING VERSION STATE NET-ENABLED WIFI-HARDWARE WIFI WWAN-HARDWARE WWAN
running 0.9.4.0 connected enabled enabled enabled enabled enabled
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/resolvconf/+bug/1000244/+subscriptions
More information about the foundations-bugs
mailing list