resolvconf ignoring dns-nameservers, dns-search in iface-stanzas

Bug #911241 reported by Thomas Schweikle
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
resolvconf (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Install Ubuntu 11.04 (or 11.10, 12.04), leave interfaces configured by dhcp, then change interface configuration to static, adding dns-nameservers and dns-search lines to have resolvconf configure "/etc/resolv.conf".

Awaited result:
  "/etc/resolv.conf" holding nameserver and search information.

Real result:
  empty "/etc/resolv.conf".

Reproduceable:
  always.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: resolvconf 1.48ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-10.46-generic 2.6.38.7
Uname: Linux 2.6.38-10-generic x86_64
Architecture: amd64
Date: Tue Jan 3 14:44:09 2012
InstallationMedia: Ubuntu-Server 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.2)
PackageArchitecture: all
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: resolvconf
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Thomas Schweikle (tps) wrote :
Revision history for this message
Thomas Schweikle (tps) wrote :

Interface configuration:
/etc(network/interfaces:
auto eth0
iface eth0 inet static
  address 192.168.180.73
  netmask 255.255.254.0
  dns-nameservers 192.168.180.28 192.168.181.28
  dns-search mydomain.example

auto eth1
iface eth1 inet static
  address 213.13.12.73
  netmask 255.255.254.0
  gateway 213.13.12.1
  dns-nameservers 192.168.180.28 192.168.181.28
  dns-search mydomain.example
----

/etc/resolv.conf after rebooting:
# 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
----
This empty file breaks nearly everything ...!

/etc/resolv.conf is a symlink as expected:
#ls -l /etc/resolv.conf
lrwxrwxrwx 1 root root 31 Jan 3 14:53 /etc/resolv.conf -> /etc/resolvconf/run/resolv.conf
----

/etc/default/resolvconf:
doesn't exist.

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

The dns-* lines in /etc/network/interfaces only affect ifup/ifdown. Are you using ifup to configure your interfaces? Or are you using NetworkManager, the default network configuration tool in Ubuntu?

What is the version number of the resolvconf package you have installed?
--
Thomas Hood

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

Try resolvconf 1.63ubuntu1.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in resolvconf (Ubuntu):
status: New → Confirmed
Thomas Hood (jdthood)
Changed in resolvconf (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Bo Nygaard Bai (bai-v) wrote :

I can confirm the bug.

The resolvconf package is installed and the network-manager package is not.

Relevant part of /etc/network/interfaces:
----
# The primary network interface
auto eth0
iface eth0 inet static
 address 130.225.51.87
 netmask 255.255.255.0
 network 130.225.51.0
 broadcast 130.225.51.255
 gateway 130.225.51.1
 # dns-* options are implemented by the resolvconf package, if installed
 dns-nameservers 130.225.51.16 130.225.51.19 130.225.51.99
 dns-search es.aau.dk
----

After boot /etc/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
-----

Doing 'ifdown eth0' followed by 'ifup eth0' will do the right thing.

Conclusion:
=========

The resolvconf package works fine if the interface is brought up via the command line, but during boot it writes a useless /etc/resolv.conf file.

The ifup command takes a long time to complete which may hint at further problems.

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

This bug report looks a lot like #366967 and its twelve duplicates, which was closed by version 1.63ubuntu1.

Which version of the resolvconf package are you using?

If you aren't using at least 1.63ubuntu1, please upgrade, try again, and report back.
--
Thomas Hood

Revision history for this message
DBF (fasnacht) wrote :

I can confirm the above behaviour for the current version of resolvconf in oneiric: 1.48ubuntu1

However manually downloading and installing the current resolvconf from precise, version 1.63ubuntu3 fixes the problem.

A possible workaround without involving non-oneiric packages is purging resolvconf and installing openresolv instead...

Thomas Hood (jdthood)
Changed in resolvconf (Ubuntu):
status: Incomplete → Fix Released
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.