Bug 499482 - NetworkManager expects /proc/sys/kernel/hostname as the fqdn
NetworkManager expects /proc/sys/kernel/hostname as the fqdn
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: NetworkManager (Show other bugs)
12
All Linux
low Severity medium
: ---
: ---
Assigned To: Dan Williams
Fedora Extras Quality Assurance
: Reopened, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-06 15:57 EDT by Gerald Carter
Modified: 2010-12-05 01:54 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-12-05 01:54:50 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Analysis of NM behavior in FC 10 (20.14 KB, application/octet-stream)
2009-05-06 15:57 EDT, Gerald Carter
no flags Details

  None (edit)
Description Gerald Carter 2009-05-06 15:57:21 EDT
Created attachment 342710 [details]
Analysis of NM behavior in FC 10

Description of problem:

I'm proxying for one our Likewise Open engineers.  He claims that in FC 10, "NetworkManager requires the kernel hostname to be a fqdn, or the machine cannot have a fqdn."  This is breaking an invariant in our domainjoin code that is working on previous Fedora and RedHat releases (as far back as RHEL 2.1 and FC 3)

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

NetworkManager-0.7.0.99-5.git20090326

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

I spoke with Jeff Layton at Samba XP and he commented that the hostname policy on Fedora and RedHat may be more historical than standard.  We perform domain joins to Active Directory across a wide variety of BSD, Linux, OS X, and commericial Unix environments.  FC 10 is exhibiting a change in NM behavior that is causing some grief.

I'm attaching a write up (in OO format) of the problem description.  We don't see this behavior in other Linux distros with similar or newer releases of NM.  

Our code can be found at http://git.likewiseopen.org/ in the likewise-open repository.
Comment 1 Niels Haase 2009-05-07 14:46:00 EDT
This bug has been triaged

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers
Comment 2 Dan Williams 2009-10-16 18:09:15 EDT
Bill, any thoughts?  I forget; should NM just be stripping off everything after the first '.' and stuff that into /etc/resolv.conf's search line, and everything before it set as the hostname, or...?
Comment 3 Bill Nottingham 2009-10-19 12:54:26 EDT
Historical ifcfg behavior is we take the hostname passed to us (from /etc/sysconfig/network, or whatever), set that value unmodified as the hostname, and everything after the first '.' is put in the search line. (However, for dhcp, search lines are determined by DHCP data.)
Comment 4 Dan Williams 2009-10-30 03:16:56 EDT
Ok, NM is matching current ifcfg behavior here then AFAICT...  whatever is in /etc/sysconfig/network's HOSTNAME is used as the machine hostname, or whatever DHCP sends down if the persistent hostname is not defined.
Comment 5 Kyle Stemen 2009-10-30 12:58:55 EDT
It is true that NM and ifcfg both read the kernel hostname setting from /etc/sysconfig/network. So that behavior is consistent.

However, ifcfg allowed the fqdn to be different from the kernel hostname. This is because ifcfg allowed the user to override the setting in /etc/hosts. NM will always undue any user customizations to loopback in that file.

To maintain compatibility in NM with ifcfg, I recommend adding a setting to NM to disable it from modifying /etc/hosts.
Comment 6 Gerald Carter 2009-10-30 13:09:37 EDT
Can we get some clarification on comment #5 from a redhat dev please?
Comment 7 Dan Williams 2009-11-02 14:30:34 EST
(In reply to comment #5)
> It is true that NM and ifcfg both read the kernel hostname setting from
> /etc/sysconfig/network. So that behavior is consistent.
> 
> However, ifcfg allowed the fqdn to be different from the kernel hostname. This
> is because ifcfg allowed the user to override the setting in /etc/hosts. NM
> will always undue any user customizations to loopback in that file.
> 
> To maintain compatibility in NM with ifcfg, I recommend adding a setting to NM
> to disable it from modifying /etc/hosts.  

Unfortunately we cannot add such a setting, because if /etc/hosts is out-of-sync with the local hostname, quite a few things fail.  Your kernel fqdn *must* be resolvable to a known IP address, and that obviously should be some IP address assigned to the local machine.  By adding an option to disable modify /etc/hosts, the mapping may get broken and it's actually a hard problem to track down, and would cause quite a few bug reports.

I think in the end the real solution is to either (a) use xdg-hostname or one of the other tools than handles hostnames instead of NM, or (b) add 127.0.0.2 to the loopback device and let users configure /etc/hosts as they wish for 127.0.0.2 while NM still configures the entry for 127.0.0.1.
Comment 8 Bug Zapper 2009-11-18 06:54:42 EST
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 9 Bug Zapper 2010-11-04 07:16:44 EDT
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 10 Bug Zapper 2010-12-05 01:54:50 EST
Fedora 12 changed to end-of-life (EOL) status on 2010-12-02. Fedora 12 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

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