NetworkManager fouls up /etc/hosts

Bug #185280 reported by Tim Allen
2
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

(pasted from http://bugzilla.gnome.org/show_bug.cgi?id=452929 after they claimed it was Not Their Problem)

I recently installed Ubuntu 7.10 on a MacBook, and this same thing happens all
the time (with my wired Ethernet connection). Any X11 program pauses for about
ten seconds at startup while (I assume) trying to do reverse-DNS (my test
program was "time xterm -e ls").

Manually changing the line in /etc/hosts from:

    127.0.1.1 deacon.thristian.org

...to:

    127.0.1.1 deacon.thristian.org deacon

resolves the issue, but after sleeping and waking the laptop, or whatever
causes NetworkManager to wake up and reshuffle the config files it controls,
this is automatically "fixed" to be:

    127.0.1.1 deacon.thristian.org deacon.thristian.org

...and of course the problem is back.

Revision history for this message
Parthan SR (parth-technofreak) wrote :

Open NetworkManager and check what is in the General --> Domain Name field.

Revision history for this message
Tim Allen (screwtape) wrote :

It looks much like this:

Host Settings
  Host name: deacon
  Domain name: thristian.org

Matthew Woerly (nattgew)
Changed in network-manager:
status: New → Incomplete
Revision history for this message
Iulian Udrea (iulian) wrote :

You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering is this still an issue for you? If you still have this issue please add /var/log/syslog after you reproduced your bug to this report. For more information please see https:/wiki.ubuntu.com/DebuggingNetworkManager

Revision history for this message
Tim Allen (screwtape) wrote :

I messed around with network-admin until the problem stopped happening, so I took some time today to try and reproduce the problem again. I kept notes about what I was doing, which I've attached.

The short version is:
 - In roaming mode, NetworkManager (well, network-admin, but I suspect they're closely related) likes to forget the settings I've told it, like "domain name" and "DNS servers". The easiest way to make this happen is to reboot; I suspect renewing the DHCP lease might cause the same effect, although unplugging and re-plugging the network cable doesn't.
 - The fact that the "Location" field doesn't stay set between invocations of network-admin is confusing, especially given the larger-scale forgetting in the previous point.
 - It seems that the crucial factor is not the contents of the "Hosts" tab, but the "General" tab - the long delays appear when "Domain" is empty on the General tab, but go away when "Domain" is filled in.

I'm not sure if this is actually a NetworkManager bug - it might be a documentation bug (The network-admin online help is rather simplistic and doesn't mention roaming mode at all, let alone tell me how I should expect it to work). If this bug is in the wrong place, I'd appreciate any help you could give me about moving it to wherever the right place might be.

Revision history for this message
Alexander Sack (asac) wrote :

NM doesa handle hostnames more gracefully now. howver, i think in your case the hostname was updated by something else (e.g. an ifup.d hook or resolvconf or ppp or dhcp).

Changed in network-manager:
status: Incomplete → Invalid
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.