Red Hat Bugzilla – Bug 445741
'set hostname from DHCP' doesn't work with NetworkManager
Last modified: 2014-03-16 23:14:35 EDT
Description of problem:
If NM's not going to support that, we may want to take the option out.
Version-Release number of selected component (if applicable):
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
I can add a verification that this doesn't work in the released fedora 9.
My DHCP server on my xen host is automagically configured to setup as much
information as possible when I install a new virtual machine. That includes
providing the hostname as part of the DHCP info. It has worked everywhere
until I just installed a fedora 9 virtual machine today, and the hostname
still shows up as localhost.localdomain instead of the name DHCP would
(I'd note that ubuntu uses network manager, and it *does* get the hostname
set via DHCP - perhaps because the installer picks it up rather than leaving
it to NM to do later?)
Even more annoying, I can't change the hostname in the
System > Administration > Network applet. Or rather, I can change it,
but it doesn't seem to have any effect.
I have to manually edit the /etc/sysconfig/network file to make the
correct hostname permanent.
hostname returned from DHCP is not currently honored because it has historically
broken xauth (which used to be based on hostname but is now always
'localhost.localdomain'), which resulted in the inability to startup up an X
programs any more.
Now that we've almost fixed all of the instances of stupid stuff assuming the
hostname doesn't change (xauth, libSM, etc) we can finally honor hostname
changes sent via DHCP.
When installed Fedora 9 on an empty disk, using DHCP for IP address and host
name, dhclient runs with -sf set to nm-dhcp-client.action. While the DHCP
answer included the host name, the hostname on the computer did not get set to
the name from DHCP. Instead it stayed at localhost.localdomain. I also noticed
that init.d/network is not linked to any S file in /etc/rc5.d.
On another computer I did an upgrade with yum from Fedora 8 to Fedora 9. It
still runs with no -sf option, so it uses dhclient-script. It sets the hostname
correctly from the DHCP answer. S10network is linked to init.d/network.
Is there any update on this? It's still not honouring the domainname and
hostname set from DHCP.
Fixing this is important for servers booting from a LiveCD.
As a workaround, one can use the old-fashioned network service (chkconfig network on). During boot it sets the hostname based on a reverse DNS lookup on the IP address that dhclient has assigned (see /etc/sysconfig/network-scripts/ifup-post).
This bug appears to be a duplicate of bug 441453.
*** This bug has been marked as a duplicate of bug 441453 ***