multiple .local search domains not honoured

Bug #781557 reported by Lieven Van Acker
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dnsmasq (Ubuntu)
Incomplete
Medium
Unassigned

Bug Description

Binary package hint: resolvconf

in /etc/resolvconf/resolv.conf.d/base I have

search domain1.local domain2.local

When trying to connect to a host in domain2.local using only the hostname, only the first domain is searched by my local dnscache (dnsmasq):

lieven@T500:~$ ping host2
ping: unknown host host2

while dnsmasq only gets the query for domain1.local

May 12 09:33:38 T500 dnsmasq[4302]: query[A] host2.domain1.local from 127.0.0.1
May 12 09:33:38 T500 dnsmasq[4302]: forwarded host2.domain1.local to 192.168.5.254
May 12 09:33:43 T500 dnsmasq[4302]: query[A] host2.domain1.local from 127.0.0.1
May 12 09:33:43 T500 dnsmasq[4302]: forwarded host2.domain1.local to 192.168.5.254

my /etc/resolv.conf (linked to /etc/resolvconf/run/resolv.conf) contains

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1
search domain1.local domain2.local dhcp.supplied.domain.net

I used this kind of config before (on maverick) but I can't get it working on natty.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: resolvconf 1.48ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic-pae 2.6.38.2
Uname: Linux 2.6.38-8-generic-pae i686
Architecture: i386
Date: Thu May 12 10:52:11 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110427.1)
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_US:en
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: resolvconf
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Lieven Van Acker (lieven) wrote :
Revision history for this message
Thomas Hood (jdthood) wrote :

Not a resolvconf issue: resolvconf correctly composes the "search" line in resolv.conf and that's all it's meant to do.

Reassigning to dnsmasq.

affects: resolvconf (Ubuntu) → dnsmasq (Ubuntu)
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Medium priority as this only affects users with multiple search domains. Possibly a regression in natty so tagging with regression-release.

Changed in dnsmasq (Ubuntu):
importance: Undecided → Medium
tags: added: regression-release
Revision history for this message
Simon Kelley (simon-thekelleys) wrote : Re: [Bug 781557] [NEW] multiple search domains not honoured

Launchpad Bug Tracker wrote:
> You have been subscribed to a public bug:
>
> Binary package hint: resolvconf
>
> in /etc/resolvconf/resolv.conf.d/base I have
>
> search domain1.local domain2.local
>
> When trying to connect to a host in domain2.local using only the
> hostname, only the first domain is searched by my local dnscache
> (dnsmasq):
>
> lieven@T500:~$ ping host2
> ping: unknown host host2
>
> while dnsmasq only gets the query for domain1.local
>
> May 12 09:33:38 T500 dnsmasq[4302]: query[A] host2.domain1.local from 127.0.0.1
> May 12 09:33:38 T500 dnsmasq[4302]: forwarded host2.domain1.local to 192.168.5.254
> May 12 09:33:43 T500 dnsmasq[4302]: query[A] host2.domain1.local from 127.0.0.1
> May 12 09:33:43 T500 dnsmasq[4302]: forwarded host2.domain1.local to 192.168.5.254
>
> my /etc/resolv.conf (linked to /etc/resolvconf/run/resolv.conf) contains
>
> # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
> # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
> nameserver 127.0.0.1
> search domain1.local domain2.local dhcp.supplied.domain.net
>

Sorry to bounce responsibilty again, but this isn't a dnsmasq problem,
the search-domain function is implemented by the libc resolver code,
which should generate separate DNS queries for host2.domain1.local,
host2.domain2.local, etc. Dnsmasq's only role in this is to forward
those queries. Since from the log, the host2.domain2.local aren't
getting to dnsmasq, the problem must lie elsewhere.

Cheers,

Simon.

Revision history for this message
Thomas Hood (jdthood) wrote : Re: multiple search domains not honoured

Lieven Van Acker: Can you investigate this further to figure out why dnsmasq isn't being asked to look up 'host2.domain2.local'?

Thomas Hood (jdthood)
Changed in dnsmasq (Ubuntu):
status: New → Incomplete
Revision history for this message
Thomas Hood (jdthood) wrote :

In the absence of interest on the submitter's part in pursuing the matter, and since there seems to be no problem in either resolvconf or dnsmasq, marking Invalid.

Changed in dnsmasq (Ubuntu):
status: Incomplete → Invalid
Thomas Hood (jdthood)
Changed in dnsmasq (Ubuntu):
status: Invalid → Incomplete
Revision history for this message
Thomas Hood (jdthood) wrote :

Marking as duplicate since it's similar.

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

Noticing that the domain names in question end in .local, this could be bug #80900.

Try the workaround. In /etc/nsswitch.conf, change

    hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4

to

    hosts: files dns [NOTFOUND=return] mdns4

summary: - multiple search domains not honoured
+ multiple .local search domains not honoured
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.