Original resolv.conf generated by Puppet appended to resolvconf-generated resolv.conf

Bug #1063639 reported by Msquared
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu Business Desktop Remix, by Canonical
New
Undecided
Unassigned

Bug Description

Although the search domain is saved to resolv.conf, the resolver is not resolving hosts in the search domain.

Here I'm trying to ping a host whose IP is resolvable via the search domain, but ping can't find the IP unless I add the domain name to the host name:

user@accrec2:~$ ping kane
ping: unknown host kane
user@accrec2:~$ ping kane.jjhawkins.com.au
PING kane.jjhawkins.com.au (192.168.1.11) 56(84) bytes of data.
64 bytes from kane.jjhawkins.com.au (192.168.1.11): icmp_req=1 ttl=64 time=0.175 ms
64 bytes from kane.jjhawkins.com.au (192.168.1.11): icmp_req=2 ttl=64 time=0.192 ms
^C
--- kane.jjhawkins.com.au ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.175/0.183/0.192/0.016 ms
user@accrec2:~$

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: resolvconf 1.63ubuntu16
ProcVersionSignature: Ubuntu 3.2.0-31.50-generic 3.2.28
Uname: Linux 3.2.0-31-generic i686
ApportVersion: 2.0.1-0ubuntu13
Architecture: i386
Date: Mon Oct 8 16:39:40 2012
DistributionChannelDescriptor:
 # This is a distribution channel descriptor
 # For more information see http://wiki.ubuntu.com/DistributionChannelDescriptor
 canonical-oem-boulder-precise-x86-20120504-0
InstallationMedia: Ubuntu 12.04 "Precise" - Build i386 LIVE Binary 20120504-02:32
PackageArchitecture: all
ProcEnviron:
 SHELL=/bin/bash
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_AU.UTF-8
 LANGUAGE=en_AU:en
SourcePackage: resolvconf
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Msquared (msquared.id.au) wrote :
Revision history for this message
Thomas Hood (jdthood) wrote :

Looking at your resolv.conf file I see that the first part is generated by resolvconf and the second part by puppet. The latter part includes a line

    domain buildd

which overrides the search line earlier in the file.

Please post the output of the following commands run in a terminal window.

    ls -l /etc/resolvconf/resolv.conf.d
    cat /etc/resolvconf/resolv.conf.d/original

Changed in resolvconf (Ubuntu):
status: New → Incomplete
Revision history for this message
Msquared (msquared.id.au) wrote :

Output of :

    ls -l /etc/resolvconf/resolv.conf.d
    cat /etc/resolvconf/resolv.conf.d/original

Revision history for this message
Thomas Hood (jdthood) wrote :

Solution: as root do

    rm -f /etc/resolvconf/resolv.conf.d/tail
    ln -s /dev/null /etc/resolvconf/resolv.conf.d/tail
    resolvconf -u

Changed in resolvconf (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Msquared (msquared.id.au) wrote :

That fixed my problem, though I'm curious as to what caused it...

Thanks!

Revision history for this message
Thomas Hood (jdthood) wrote :

The cause: when resolvconf was installed the debconf question "Append original file to dynamic file?" was answered in the affirmative. (The default is negative.)

I'm glad the problem is fixed!

Revision history for this message
Msquared (msquared.id.au) wrote :

The incident is fixed but the problem remains. However, it turns out this problem seems to be related to Business Desktop Remix.

I re-ran a complete fresh re-install from the Business Desktop Remix 12.04 disc (where I first discovered this problem), and the issue occurred again. When I ran a complete fresh install from the standard Ubuntu Desktop 12.04 disc, there was no problem.

In respect to the installation process for Business Desktop Remix: I was never asked a question about appending the original resolv.conf file to the dynamic file; I suspect that this question is answered automatically or implicitly by some configuration or set of packages chosen during installation of Business Desktop Remix, or something like that.

Should I re-open this bug, file a new one here, or file a new one somewhere appropriate for the Business Desktop Remix?

Revision history for this message
Msquared (msquared.id.au) wrote :

This bug appears to affect the Business Desktop Remix, but not the standard distribution.

affects: resolvconf (Ubuntu) → ubuntu-business-remix
Changed in ubuntu-business-remix:
status: Invalid → New
Revision history for this message
Thomas Hood (jdthood) wrote :

@Msquared: Please post the output of the following command run in a terminal.

    debconf-show resolvconf

summary: - Resolver ignores search domain from DHCP server
+ Original resolv.conf generated by Puppet appended to resolvconf-
+ generated resolv.conf
Revision history for this message
Msquared (msquared.id.au) wrote :

root@accrec2:~# debconf-show resolvconf
  resolvconf/downup-interfaces:
  resolvconf/linkify-resolvconf: false
  resolvconf/link-tail-to-original: true
  resolvconf/reboot-recommended-after-removal:
root@accrec2:~#

Revision history for this message
Peter Lemieux (seijisensei) wrote :

I am having a similar problem with Kubuntu 12.04 (fully updated to today) even after disabling resolvconf. The resolver appears to ignore the search strings in /etc/resolv.conf entirely.

I have uninstalled both dnsmasq and resolvconf from the this machine and am using settings in the KDE Network Manager to create /etc/resolv.conf instead. I told the client to obtain only the machine's IP address with DHCP and to use static items to populate resolv.conf. I get the correct /etc/resolv.conf as a result:

# Generated by NetworkManager
nameserver 192.168.100.100
nameserver xx.xxx.xxx.xx
nameserver 8.8.8.8
search example.com somethingelse.com

However unqualified host names are not searched using the entries in the search directive. If I run "host mail" from the prompt, I get the results for mail.com, not mail.example.com. Other unqualified names are also resolved to "hostname.com".

I tried removing the mdns entries from nsswitch.conf so that I have only "hosts: files dns" entered there. I get the same erroneous lookups. However if I place the unqualified names in /etc/hosts, I get the correct resolutions. Something about the resolver (kernel code?) seems to make it ignore the search list.

Revision history for this message
Peter Lemieux (seijisensei) wrote :

Oh, and I checked to make sure it wasn't my in-house DNS server at 192.168.100.100 causing the problem. If I restrict /etc/resolv.conf to just Google's server at 8.8.8.8, I get the same behavior. Unqualified names have ".com" appended to them.

Revision history for this message
Thomas Hood (jdthood) wrote :

@Peter Lemieux: If you have disabled resolvconf then it is not the same problem. Please file a new bug report.

Revision history for this message
Thomas Hood (jdthood) wrote :

Msquared wrote:
> resolvconf/link-tail-to-original: true

This confirms that this question was answered in the affirmative and that that was the cause of the originally reported symptoms.

> I was never asked a question about appending the original
> resolv.conf file to the dynamic file; I suspect that this
> question is answered automatically or implicitly by some
> configuration or set of packages chosen during installation
> of Business Desktop Remix, or something like that.

Perhaps the Business Desktop Remix preseeds that debconf question with "true"?

Revision history for this message
Msquared (msquared.id.au) wrote :

I think you are right. (When I said "answered automatically", that was what I meant, but just didn't know the term you use for it.)

In any case: Is this behaviour in Business Desktop Remix a bug, or desired behaviour?

If it's a bug, how do we fix it?
If it's desired behaviour, how to we document it and/or provide a way to change it during installation?

Revision history for this message
Thomas Hood (jdthood) wrote :

Here's the perspective of the Debian resolvconf maintainer. Resolvconf is in Debian an optional package and is often installed on a Debian system whose resolver was previously configured by hand. It is almost impossible to write maintainer scripts that perfectly handle all possible previous custom configurations; however a number of things are done in the Debian resolvconf maintainer scripts to increase the chances that the installation goes well and doesn't leave the system without name service. One of the measures is to offer the admin the option of "linking tail to original", i.e., of including the pre-existing static file in the dynamically generated file. Doing this is never the best thing to do, but it can be better than not doing it if the admin doesn't know yet how to configure resolvconf properly.

In Ubuntu resolvconf was never really an optional package (it was broken in Universe for a few years) before it became a standard package. It rarely gets installed on an Ubuntu system that was previously configured by hand. So "link tail to original" is not likely to be helpful on an Ubuntu system. I would be happy to see the feature removed from the Ubuntu package and, now that I think about it, I think it's time to remove it from the Debian package as well. So maybe I'll just axe it in the next release and then it will disappear from the Ubuntu package the next time there's a sync.

Revision history for this message
Thomas Hood (jdthood) wrote :

I should add that the Remix should be fixed without waiting for changes to trickle down from upstream. E.g., if the Remix is preseeding the debconf question "resolvconf/link-tail-to-original" with "true" then it should stop doing that.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.