Upgrade to oneiric wiped my resolv.conf for static interface

Bug #862134 reported by Julian Edwards
114
This bug affects 25 people
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Fix Released
High
Unassigned
Oneiric
Fix Released
High
Mathieu Trudel-Lapierre

Bug Description

I have a static eth0 (ie not managed by network manager). I upgraded from natty to oneiric and it wiped the resolv.conf file (but only on the second boot, bizarrely) leaving it looking like this:

{{{
# Generated by NetworkManager
}}}

Revision history for this message
Julian Edwards (julian-edwards) wrote :

It's doing this on every boot now.

Revision history for this message
Julian Edwards (julian-edwards) wrote :

My /etc/network/interfaces file looks like this:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.1.1
broadcast 192.168.1.255
dns-nameservers 192.168.1.5
dns-search *********.com

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

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

Changed in network-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Matthias (matthias-puech-deactivatedaccount) wrote :

Same here. It appears that the packet 'resolvconf' had been removed from the system. Reinstalling it and doing a ifdown eth0 && ifup eth0 fixes the problem.
Maybe we did the upgrade at the wrong moment...

Revision history for this message
Julian Edwards (julian-edwards) wrote : Re: [Bug 862134] Re: Upgrade to oneiric wiped my resolv.conf for static interface

On Wednesday 12 October 2011 09:32:27 you wrote:
> Same here. It appears that the packet 'resolvconf' had been removed from the
> system. Reinstalling it and doing a ifdown eth0 && ifup eth0 fixes the
> problem. Maybe we did the upgrade at the wrong moment...

I uninstalled network manager and hard-coded resolv.conf. I don't know what
the "right" fix is.

Revision history for this message
netskaven (netskaven) wrote :

I installed resolvconf and it doesn't create resolv.conf in boot

Revision history for this message
Serge Hartmann (serge-hartmann) wrote :

Same problem here :
- Upgrade to Oneiric erased my resolv.conf
- Following your instructions I installed "resolconf" package
- Resolvconf is supposed to merge what's in /etc/resolvconf/resolv.conf.d/ ; but it doesn't
- I still have no DNS resolution until I add my servers into /etc/resolv.conf
- Rebooting ersases resolf.conf

Revision history for this message
Jürgen Sauer (juergen-sauer) wrote :

this is an release critical bug!

Simply an NO-GO-AT-ALL !

The oneiric Releas must not happpen containing this bug.

Unqualified rewrite resolv.conf is an deasater!

Also NEtwork Manager disobeys a chmod 444 /etc/resolv.conf !

Simply not trash !

Revision history for this message
Jürgen Sauer (juergen-sauer) wrote :

Such a thing has to be tested bevore Release !

Revision history for this message
Steve Langasek (vorlon) wrote :

marking this one for fixing in oneiric-updates. NM should obviously not be managing resolv.conf when it's not managing any interfaces.

Changed in network-manager (Ubuntu):
importance: Undecided → Critical
importance: Critical → High
Changed in network-manager (Ubuntu Oneiric):
importance: Undecided → High
status: New → Triaged
Changed in network-manager (Ubuntu):
status: Confirmed → Triaged
Changed in network-manager (Ubuntu Oneiric):
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
milestone: none → oneiric-updates
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Julian or others affected: are there any interfaces on the affected system that should be handled by NetworkManager? eth0 is configured in /e/n/i; but should NM be managing a wireless device, for instance?

Revision history for this message
Julian Edwards (julian-edwards) wrote :

In my case, no, I only have one static interface. I have uninstalled NM and I'm happy again. However, something regressed since natty since the config in my comment #2 used to set resolv.conf for me.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Julian,

Was that with resolvconf installed? resolvconf doesn't appear to be responding correctly here: it seems it resets the /etc/resolvconf/run/interface directory when started and thus is missing the required files from NM and ifupdown, which could explain the issues.

Revision history for this message
Julian Edwards (julian-edwards) wrote :

I don't know if I had resolvconf installed before the upgrade, sorry. I know that it was not installed *after* though, as I installed it to try it out on oneiric. It didn't work!

Revision history for this message
Carlos Correia (carlos-m16e) wrote :

I had not resolvconf installed (or it was uninstalled during the upgrade). As for the interface issue, I've only one, eth0, static.

Removing networkmanager also fixed the problem.

Revision history for this message
netskaven (netskaven) wrote :

Only eth0 here too

Revision history for this message
Serge Hartmann (serge-hartmann) wrote :

I had not resolvconf package installed before I tries to fix the bug.
However, resolvconf does not work much better :

- The file /etc/resolvconf/resolv.conf.d/original contains my nameservers, but is not merged to my actual /etc/resolv.conf (and does not work for dns if not)

- I forced a "cat /etc/resolvconf/resolv.conf.d/original >> /etc/resolv.conf" at the end of /etc/network/if-up.d/000resolvconf but it doesnt merge, or if it does, it is overwriten afterwards by an empty resolv.conf.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Indeed, resolvconf doesn't appear to work properly here either, so cases with one or more devices unmanaged and some devices managed by NM fails -- there's just no easy way to know what to do with resolv.conf in such a case, even just saving on startup and restoring that file on stop is kind of clumsy; this case is really supposed to be covered by resolvconf -- I'll file a separate bug for that.

As for the case with NM installed (read: running) but not managing any devices, it really shouldn't be clobbering /etc/resolv.conf. Fortunately, that's relatively easy to fix. I'll upload an updated package that covers this shortly.

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Julian, or anyone else affected,

Accepted network-manager into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in network-manager (Ubuntu Oneiric):
status: Triaged → Fix Committed
tags: added: verification-needed
Revision history for this message
Serge Hartmann (serge-hartmann) wrote :

I upgraded to network-manager 0.9.1.90-0ubuntu5.
The fix works for me : my original resolv.conf file is kept after reboot.
I removed resolvconf packages which is useless in this case and didn't solve.
Thanks a lot for Mathieu and Martin.
Serge

tags: added: verification-done
removed: verification-needed
Revision history for this message
netskaven (netskaven) wrote :

+1 Serge Hartmann

Revision history for this message
FernanAguero (fernan-ciudad) wrote :

+1 here. Just upgraded to 11.10, and my resolv.conf gets wiped on every reboot.

network-manager is 0.9.1.90-0ubuntu6

Revision history for this message
Serge Hartmann (serge-hartmann) wrote :

@FernanAguero : This should not happen until you have upgraded to the proposed package - which fixes the bug.
Which repository gives you this package revision ?

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

This bug was fixed in the package network-manager - 0.9.1.90-0ubuntu5

---------------
network-manager (0.9.1.90-0ubuntu5) oneiric-proposed; urgency=low

  * debian/patches/fix_reading_intlist-like_ssids_965d586.patch: Fix numeric
    SSIDs parsing; if there is no semicolon, except the file is in new format
    (so just a valid, all-nums SSID rather than a integer list). (LP: #874328)
  * debian/patches/lp862134_resolv_conf_updates.patch: don't update routing
    and DNS for unmanaged devices or devices transitioning to unmanaged; in an
    attempt to keep possibly correct resolv.conf contents and routes.
    (LP: #862134)
 -- Mathieu Trudel-Lapierre <email address hidden> Thu, 20 Oct 2011 07:36:41 -0400

Changed in network-manager (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Changed in network-manager (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Retromingent (ray-rwalk2730) wrote :

This problem just started occurring again after latest update on Oneric and after reboot.

Revision history for this message
Roland Meier (rm369) wrote :

+1 also on Precise

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

In Precise you should have resolvconf installed and /etc/resolv.conf should be a symbolic link "../run/resolvconf/resolv.conf". Please read resolvconf(8).

Revision history for this message
Roland Meier (rm369) wrote :

You are right, sorry. It was not the same problem, and a reboot solved it anyway.

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.