[Bug 990660] Re: dns-domain in interfaces appears as search in resolv.conf

Nathan Stratton Treadway ubuntu.lp at nathanst.com
Thu May 10 23:02:05 UTC 2012


On Sat, Apr 28, 2012 at 18:34:21 -0000, Jeffry A. Spain wrote:
> While I agree that the functional difference is perhaps
> immaterial, I would argue that mapping both "dns-domain"
> and "dns-search" in /etc/network/interfaces to "search"
> in resolv.conf serves only to increase the possibilities
> for confusion and errors, particularly since this mapping
> appears to be undocumented as well as unintuitive. For
> the sake of consistency, it makes sense either to map
> "dns-domain" to "domain" and "dns-search" to "search", or
> if you think the use of "domain" in resolv.conf should be
> deprecated, then eliminate "dns- domain" in interfaces.

Just to clarify the situation slightly, this mapping of
"domain" to "search" isn't specific to the
/etc/network/interfaces file, but applies to all resolvconf
"sources".

Basically, resolvconf can get resolv.conf information from
many difference sources (DHCP client, dns-* lines in the
"interfaces" file, VPN connections, etc), and in all those
cases it just stores the provided resolv.conf lines into
files found under /run/resolvconf/interfaces/ .  (So in
other words those files can each contain various
combinations of "nameserver", "domain", "search", etc.
lines.)

Then as a separate step, resolvconf -- or, more
specifically, the /etc/resolvconf/update.d/libc script --
looks through all the saved information to build the new
/run/resolvconf/resolv.conf file ... and as part of that
process it combines all "domain" and "search" lines from
all the input sources into the single "search" line that
you see in the generated file.


Put another way, on the "publication" side resolvconf just
preserves whatever resolv.conf lines are provided to it
(and following that paradigm it supports both "dns-domain"
and "dns-search" options in the network/interfaces file,
just as both types of lines are supported coming from other
sources).
 
But on the "subscription" side, due to the restrictions of
the resolv.conf file, the only way to deal with multiple
occurences of either "domain" or "search" input lines is to
combine them all into a single "search" line in the
generated file.


[Given all that, I agree the resolvconf(8) page could
probably be made a bit more detailed.  I'm not sure the
best way to do that, but perhaps it would work just to add
a paragraph to the discussion of the update.d/libc script
(in the SUBSCRIPTION section) describing the processing
done to generate the resolv.conf file (e.g. mentioning the
use of a single "search" line for all "domain" and "search"
input lines, that only the first three "nameserver" lines
found are used, etc.).]


					Nathan

-- 
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/990660

Title:
  dns-domain in interfaces appears as search in resolv.conf

Status in “resolvconf” package in Ubuntu:
  Invalid

Bug description:
  As recommended in the post http://www.stgraber.org/2012/02/24/dns-in-
  ubuntu-12-04/, I placed "dns-domain countryday.net" in an iface stanza
  in /etc/network/interfaces. The resulting resolv.conf file contains
  "search countryday.net" rather than "domain countryday.net" as I would
  have expected.

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: resolvconf 1.63ubuntu11
  ProcVersionSignature: Ubuntu 3.2.0-24.37-generic 3.2.14
  Uname: Linux 3.2.0-24-generic x86_64
  ApportVersion: 2.0.1-0ubuntu6
  Architecture: amd64
  Date: Sat Apr 28 13:53:55 2012
  InstallationMedia: Ubuntu-Server 12.04 LTS "Precise Pangolin" - Release amd64 (20120424.1)
  PackageArchitecture: all
  ProcEnviron:
   TERM=linux
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: resolvconf
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/resolvconf/+bug/990660/+subscriptions




More information about the foundations-bugs mailing list