Bug 660128 - NetworkManager ignoring /etc/sysconfig/network hostname, using localhost.localdomain instead
Summary: NetworkManager ignoring /etc/sysconfig/network hostname, using localhost.loca...
Keywords:
Status: CLOSED DUPLICATE of bug 648725
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: 14
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Dan Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-05 18:15 UTC by Need Real Name
Modified: 2011-02-25 19:08 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-02-25 19:08:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2010-12-05 18:15:37 UTC
Description of problem:

We have noticed recently that NetworkManager is ignoring or otherwise overriding /etc/sysconfig/network hostname settings.  We set an FQDN there, but after reboot and logging in via GDM, it has changed to localhost.localdomain.  We are using wireless with DHCP by default, and these are multi-homed laptops.  They are often booted on different networks and/or suspended on one and resumed on another.

Version-Release number of selected component (if applicable):

NetworkManager-0.8.1-10.git20100831.fc14.x86_64

but we think this has been going on for a while, so it probably isn't specific to that version. It also occurs on an up to date F13 laptop.

How reproducible:


Steps to Reproduce:
1. set a hostname in /etc/sysconfig/network
2. have wireless networks configured in nm-applet with DHCP, shared by all, and on boot
3. reboot
  
Actual results:

'hostname' returns localhost.localdomain by the time the user logs in

Expected results:

'hostname' ALWAYS returns the value set in /etc/sysconfig/network

Additional info:

I noticed a 'DHCP--Addresses only' option in nm-applet, but that seems to expect manually configured DNS servers.  What we expect is to get the network-provided DNS server IPs, but keep our static hostname no matter what.

Comment 1 Pierre Ossman 2010-12-14 20:47:45 UTC
This didn't occur for me on a fully updated F13, but I upgraded to F14 today and got this bug. :/

Dan, comments? Workaround?

Comment 2 Pierre Ossman 2010-12-16 07:25:56 UTC
Found the problem here. /etc/hosts had gotten the wrong SELinux context, which upset NM and made it fall back to localhost. I should remember to check the log files before I go complaining in bugzilla next time. :/

Comment 3 Dan Williams 2011-02-25 19:08:25 UTC
NM no longer touches /etc/hosts so we shouldn't run into this problem anymore.

*** This bug has been marked as a duplicate of bug 648725 ***


Note You need to log in before you can comment on or make changes to this bug.