Bug 660128 - NetworkManager ignoring /etc/sysconfig/network hostname, using localhost.localdomain instead
NetworkManager ignoring /etc/sysconfig/network hostname, using localhost.loca...
Status: CLOSED DUPLICATE of bug 648725
Product: Fedora
Classification: Fedora
Component: NetworkManager (Show other bugs)
Unspecified Unspecified
low Severity medium
: ---
: ---
Assigned To: Dan Williams
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2010-12-05 13:15 EST by Need Real Name
Modified: 2011-02-25 14:08 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-02-25 14:08:25 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2010-12-05 13:15:37 EST
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):


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 15:47:45 EST
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 02:25:56 EST
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 14:08:25 EST
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.