Bug 490188 - NetworkManager does not preserve manually entered DNS addresses.
NetworkManager does not preserve manually entered DNS addresses.
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: system-config-network (Show other bugs)
11
All Linux
low Severity urgent
: ---
: ---
Assigned To: Harald Hoyer
Fedora Extras Quality Assurance
:
: 492496 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-13 14:08 EDT by Ivo Sarak
Modified: 2010-06-28 07:28 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-28 07:28:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ivo Sarak 2009-03-13 14:08:42 EDT
Description of problem:
When ever the NetworkManager is being started, it will erase all manually set DNS addresses.

Version-Release number of selected component (if applicable):
NetworkManager-0.7.0.99-3.fc11.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. Set your ethernet device IP-address and DNS manually via system-config-network;
2. Save your network settings;
3. Check content of /etc/resolv.conf;
4. Restart NetworkManager;
5. Check again content of /etc/resolv.conf;
  
Actual results:
/etc/resolv.conf file after system-config-network:

[root@ragana ~]# cat /etc/resolv.conf
# Generated by NetworkManager


# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com
nameserver 194.204.0.1
nameserver 194.204.22.2
[root@ragana ~]# 

/etc/resolv.conf file after next run of NetworkManager:

[root@ragana ~]# /etc/init.d/NetworkManager restart
Stopping NetworkManager daemon:                            [  OK  ]
Setting network parameters...                              [  OK  ]
Starting NetworkManager daemon:                            [  OK  ]
You have new mail in /var/spool/mail/root
[root@ragana ~]# cat /etc/resolv.conf
# Generated by NetworkManager


# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com
[root@ragana ~]# 

Expected results:

/etc/resolf.conf file should have DNS servers listed even after NetworkManager being started.
Additional info:
Comment 1 Jessica Sterling 2009-03-14 20:47:35 EDT
This bug has been triaged.

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers
Comment 2 Dan Williams 2009-03-16 13:28:01 EDT
Have you let NetworkManager connect to that network?  What's the contents of /etc/sysconfig/network-scripts/ifcfg-eth0?

The DNS servers need to be in the ifcfg file as well, which I believe system-config-network will do.  If they are in the ifcfg file correctly, NM should pick them up when activating that connection, and place them into /etc/resolv.conf.  However, when NM is running but your eth0 *isn't* connected, of course /etc/resolv.conf will be blank because you can't get to those nameservers anyway.

When you see NM writing out a blank resolv.conf, can you also provide the output of the 'nm-tool' command so we can see what the network state is at that point?
Comment 3 Ivo Sarak 2009-03-18 11:59:10 EDT
[ivo@ragana ~]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0 
# nVidia Corporation MCP78S [GeForce 8200] Ethernet
DEVICE=eth0
HWADDR=00:23:54:d3:c5:2c
ONBOOT=yes
BOOTPROTO=none
NETMASK=255.255.255.0
GATEWAY=192.168.4.33
TYPE=Ethernet
IPADDR=192.168.4.15
USERCTL=yes
PEERDNS=yes
IPV6INIT=no
NM_CONTROLLED=yes
[ivo@ragana ~]$ 


[ivo@ragana ~]$ nm-tool 

NetworkManager Tool

State: connected

- Device: eth0  [System eth0] --------------------------------------------------
  Type:              Wired
  Driver:            forcedeth
  State:             connected
  Default:           yes
  HW Address:        00:23:54:D3:C5:2C

  Capabilities:
    Carrier Detect:  yes
    Speed:           100 Mb/s

  Wired Properties
    Carrier:         on

  IPv4 Settings:
    Address:         192.168.4.15
    Prefix:          24 (255.255.255.0)
    Gateway:         192.168.4.33



[ivo@ragana ~]$ 

I've entered all DNS addresses into sysytem-config-network. Why it does not enter those into proper ifcfg files, I do not know. But it does put those into resolv.conf.
Comment 4 Dan Williams 2009-03-23 17:51:50 EDT
Yeah, so that's more of a system-config-network vs. NM interaction issue; I maintain that /etc/resolv.conf cannot be the canonical source of DNS information since it needs to get changed (even when you're not using NM, for stuff like VPN connections, dialup, etc).

Thus, I tend to think that if you enter DNS information into system-config-network, that it should add DNS1/DNS2/DNS3 to each of the ifcfg files in its profile as appropriate.

Thoughts, Harald?

Then, we need the ifup to use those static DNS servers if present in the ifcfg, like it already does in ifup-ppp.  Thoughts on that Bill?
Comment 5 Bill Nottingham 2009-03-24 12:27:56 EDT
IIRC, ifup-post will handle DNS1/DNS2 fine as long as PEERDNS != no.
Comment 6 yunus 2009-04-03 10:05:37 EDT
*** Bug 492496 has been marked as a duplicate of this bug. ***
Comment 7 Bug Zapper 2009-06-09 08:13:38 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 8 Bug Zapper 2010-04-27 09:11:28 EDT
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  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 '11'.

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 11'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 11 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-06-28 07:28:17 EDT
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 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.