Bug 1278693 - resolv.conf empty after reboot
resolv.conf empty after reboot
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: NetworkManager (Show other bugs)
All Linux
medium Severity high
: rc
: ---
Assigned To: Thomas Haller
Desktop QE
Depends On:
  Show dependency treegraph
Reported: 2015-11-06 02:50 EST by Thomas Schweikle
Modified: 2017-10-26 17:11 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-10-26 17:11:15 EDT
Type: Bug
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 Thomas Schweikle 2015-11-06 02:50:36 EST
Description of problem:
After rebooting resolv.conf is empty. Sometimes domain is set, but not reliably:
-- snip
# cat /etc/resolv.conf
# Generated by NetworkManager
search rodos.somedomain.somecc

# 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
-- snap

-- snip
# cat /etc/sysconfig/network-scripts/ifcfg-eth0
NAME="System eth0"
DOMAIN="rodos.somedomain.somecc somedomain.somecc"
-- snap

settings are ignored. NetworkManager is installed and started by desktop-gui.

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

How reproducible:
Allways. Found it with:
- RedHat Enterprize linux 6.x, 7.x
- Oracle Linux 6.x, 7.x
- CentOS 6.x, 7.x

The bug is found only if all of these circumstances are matched:
- NetworkManager is installed, because it is a dependency to the installed desktop-gui
- NetworkManager is disabled and not allowed to control the given device
- NetworkManager is started

As far as I could dig into this bug:
1. resolv.conf is cleared, while initializing network setup
2. resolv.conf is set up with the given data in /etc/sysconfig/network-scripts/ifcfg-eth0
3. NetworkManager resets resolv.conf to empty, leaving only the hosts domain in "search"

Steps to Reproduce:
1. Install a desktop-gui, install resolv-wrapper
2. Set up interface as "none" (as advised by handbook)
3. Set up interface as not controlled by NetworkManager (NM_CONTROLLED="no")
4. Set DNS1=xx.xx.xx.xx, DNS2=xx.xx.xx.xx, DOMAIN="somedomain someotherdomain"
5. Reboot. /etc/resolv.conf not set to usable values -- no nameservers configured.

Actual results:
NetworkManager resets /etc/resolv.conf to only hold "search hostnames-domain"
System looses capability to resolve network names

Expected results:
NetworkManager should not even try to overwrite /etc/resolv.conf, only add to configurations found there.

Additional info:
Comment 2 Dan Williams 2016-01-04 18:45:01 EST
In this case since NM isn't allowed to control the interface, it's up to the system network scripts to do it instead.  And since NM_CONTROLLED=no, they should be doing that.

Is the sysvinit 'network' service enabled?  'chkconfig --list | grep network' would show that.
Comment 3 Dan Williams 2016-01-19 10:21:35 EST
Any chance you can provide the information I requested in comment 2?  Thanks!
Comment 4 Thomas Schweikle 2016-01-26 10:11:59 EST
# chkconfig --list | network
network         0:Aus   1:Aus   2:Ein   3:Ein   4:Ein   5:Ein   6:Aus

Ist turned on. On all systems. But some of them have an empty /etc/resolv.conf after rebooting ...
Comment 6 sushil kulkarni 2017-10-26 17:11:15 EDT
Red Hat Enterprise Linux 6 is in the Production 3 Phase. During the
Production 3 Phase, Critical impact Security Advisories (RHSAs) and
selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as
they become available.

The official life cycle policy can be reviewed here:


This issue does not meet the inclusion criteria for the Production 3
Phase and will be marked as CLOSED/WONTFIX. If this remains a critical
requirement, please contact Red Hat Customer Support to request a
re-evaluation of the issue, citing a clear business justification. Note
that a strong business justification will be required for re-evaluation.

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