Bug 719100
Summary: | NetworkManager doesn't set hostname to value returned from dhclient | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Philip Prindeville <philipp> | ||||||||
Component: | NetworkManager | Assignee: | Lubomir Rintel <lrintel> | ||||||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||
Severity: | medium | Docs Contact: | |||||||||
Priority: | unspecified | ||||||||||
Version: | 26 | CC: | awilliam, dcbw, jklimes, Marcin.Dulak, m.roth, philipp, rvykydal, sandro, thaller | ||||||||
Target Milestone: | --- | Keywords: | Reopened | ||||||||
Target Release: | --- | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | AcceptedNTH | ||||||||||
Fixed In Version: | NetworkManager-0.9.1.90-4.git20110927.fc16 | Doc Type: | Bug Fix | ||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2017-11-27 08:58:30 UTC | Type: | --- | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Bug Depends On: | |||||||||||
Bug Blocks: | 713566 | ||||||||||
Attachments: |
|
Description
Philip Prindeville
2011-07-05 18:56:02 UTC
NetworkManager tries to set hostname in the following order: 1) a configured hostname (from settings) 2) automatic hostname from the default device's config (DHCP, VPN, etc) 3) the original hostname when NM started 4) reverse-DNS lookup Please grab /var/log/messages file, so we can see the logs. Created attachment 511957 [details]
/var/log/messages
Created attachment 511961 [details]
dhclient lease file
[philipp@builder log]$ ipcalc --silent --hostname 192.168.1.10HOSTNAME=builder.redfish-solutions.com [philipp@builder log]$ NM didn't get the host name correctly from the DHCP options. Fixed upstream: 6272052f9dd9a27a2253515f47c8414ed53c09cf (master) 19cb59f5e66709877e7312fc51c4e02ec17de0f8 (NM_0_8) *** Bug 721070 has been marked as a duplicate of this bug. *** (In reply to comment #5) > NM didn't get the host name correctly from the DHCP options. > > Fixed upstream: > 6272052f9dd9a27a2253515f47c8414ed53c09cf (master) > 19cb59f5e66709877e7312fc51c4e02ec17de0f8 (NM_0_8) When will we be able to download a new version with this fix? *** Bug 721070 has been marked as a duplicate of this bug. *** NetworkManager-0.8.9997-6.git20110721.fc15,NetworkManager-openswan-0.8.999-2.git20110721.fc15,NetworkManager-openvpn-0.8.9997-2.git20110721.fc15,NetworkManager-vpnc-0.8.999-3.git20110721.fc15,NetworkManager-pptp-0.8.999-2.git20110721.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/NetworkManager-0.8.9997-6.git20110721.fc15,NetworkManager-openswan-0.8.999-2.git20110721.fc15,NetworkManager-openvpn-0.8.9997-2.git20110721.fc15,NetworkManager-vpnc-0.8.999-3.git20110721.fc15,NetworkManager-pptp-0.8.999-2.git20110721.fc15 Package NetworkManager-0.8.9997-6.git20110721.fc15, NetworkManager-openswan-0.8.999-2.git20110721.fc15, NetworkManager-openvpn-0.8.9997-2.git20110721.fc15, NetworkManager-vpnc-0.8.999-3.git20110721.fc15, NetworkManager-pptp-0.8.999-2.git20110721.fc15: * should fix your issue, * was pushed to the Fedora 15 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing NetworkManager-0.8.9997-6.git20110721.fc15 NetworkManager-openswan-0.8.999-2.git20110721.fc15 NetworkManager-openvpn-0.8.9997-2.git20110721.fc15 NetworkManager-vpnc-0.8.999-3.git20110721.fc15 NetworkManager-pptp-0.8.999-2.git20110721.fc15' as soon as you are able to, then reboot. Please go to the following url: https://admin.fedoraproject.org/updates/NetworkManager-0.8.9997-6.git20110721.fc15,NetworkManager-openswan-0.8.999-2.git20110721.fc15,NetworkManager-openvpn-0.8.9997-2.git20110721.fc15,NetworkManager-vpnc-0.8.999-3.git20110721.fc15,NetworkManager-pptp-0.8.999-2.git20110721.fc15 then log in and leave karma (feedback). NetworkManager-0.8.9997-6.git20110721.fc15, NetworkManager-openswan-0.8.999-2.git20110721.fc15, NetworkManager-openvpn-0.8.9997-2.git20110721.fc15, NetworkManager-vpnc-0.8.999-3.git20110721.fc15, NetworkManager-pptp-0.8.999-2.git20110721.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report. I think I am hitting this in F16 TC1 - setting hostname from DHCP doesn't work. In F15 it does, for details and logs please follow https://bugzilla.redhat.com/show_bug.cgi?id=733425#c9. Also on installed F16 TC1 with no HOSTNAME in /etc/sysconfig/network, referring to: NetworkManager tries to set hostname in the following order: 1) a configured hostname (from settings) 2) automatic hostname from the default device's config (DHCP, VPN, etc) 3) the original hostname when NM started 4) reverse-DNS lookup 4) works, whereas 2) (DHCP) doesn't Or is it another issue? Reopening the bug to get info, please see comment #12. Mea culpa! The changes from comment #5 are wrong. dhclient puts options to environment with prefix "new_". However, we remove that prefix before inserting options into NMDHCP4Config. So "host_name" was right. Now fixed upstream: 74615ce23c8db9bbb4404860523feed1c9a5ffc8 (master) 8e564972d6caee688f6f0894ce05863735ab6649 (NM_0_8) The original problem was probably caused by having HOSTNAME configured in /etc/sysconfig/network file that takes precedence as described in comment #12. Blocking F16Blocker so it will be considered in the next Blocker Bug meeting. This bug sorta goes hand-in-hand with bug #733425 (which is considered NTH) and has a proposed fix, so I proposed this bug be marked NTH as well. (In reply to comment #15) > Blocking F16Blocker so it will be considered in the next Blocker Bug meeting. > > This bug sorta goes hand-in-hand with bug #733425 (which is considered NTH) and > has a proposed fix, so I proposed this bug be marked NTH as well. +1, you were faster :) Jirka, Dan, can you please build an F16 NM with a fix for this? Thanks. NetworkManager-0.9.1.90-4.git20110927.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/NetworkManager-0.9.1.90-4.git20110927.fc16 Discussed at 2011-10-21 blocker review meeting. Doesn't hit any blocker criteria, but is a visible installation bug that can't be fixed post-release, so accepted as NTH. Package NetworkManager-0.9.1.90-4.git20110927.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing NetworkManager-0.9.1.90-4.git20110927.fc16' as soon as you are able to, then reboot. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2011-14722 then log in and leave karma (feedback). NetworkManager-0.9.1.90-4.git20110927.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report. (In reply to comment #21) > NetworkManager-0.9.1.90-4.git20110927.fc16 has been pushed to the Fedora 16 > stable repository. If problems still persist, please make note of it in this > bug report. Is the f15 version going to be re-released since the original release doesn't seem to have fixed this (at least not according to comment #13 and #14)? Still present in Fedora 17 (system is up to date). The problem reappeared few days ago. Disabling chkconfig NetworkManager off and enabling chkconfig network on + reboot results in correct hostname, but /var/log/messages still showing localhost Nov 14 16:41:00 localhost ... Checking old /var/log/messages* shows localhost has been there for a long time. /etc/sysconfig/network: NETWORKING=yes HOSTNAME=localhost.localdomain NM_IGNORE_HOSTNAME_LOCALHOST=yes and /etc/hosts: 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 (In reply to comment #23) > Still present in Fedora 17 (system is up to date). > The problem reappeared few days ago. > Disabling chkconfig NetworkManager off and enabling chkconfig network on > + reboot results in correct hostname, but > /var/log/messages still showing localhost > Nov 14 16:41:00 localhost ... > Checking old /var/log/messages* shows localhost has been there for a long > time. > > /etc/sysconfig/network: > NETWORKING=yes > HOSTNAME=localhost.localdomain > NM_IGNORE_HOSTNAME_LOCALHOST=yes > > and /etc/hosts: > 127.0.0.1 localhost localhost.localdomain localhost4 > localhost4.localdomain4 > ::1 localhost localhost.localdomain localhost6 > localhost6.localdomain6 Does this still happen if you restart/reload rsyslog? I suspect that rsyslog is starting before the network service has come up. You are right, but this syslog problem is just a side bug. Booting with chkconfig network on (NetworkManager off), and after service syslog restart the correct hostname appears in /var/log/messages. Is the bug to be reopen? Same fedora 17 bug #875085 Created attachment 1343928 [details]
Script used as a workaround
Let's not reopen a bug that was closed for 5 years. If you have a bug with similar symptoms, the cause is very likely different. Especially, because hostname handling was significantly refactored in the past years. Please open a new bug, and provide all necessary information for debugging. Thanks. |