Bug 1278693

Summary: resolv.conf empty after reboot
Product: Red Hat Enterprise Linux 6 Reporter: Thomas Schweikle <tschweikle>
Component: NetworkManagerAssignee: Thomas Haller <thaller>
Status: CLOSED WONTFIX QA Contact: Desktop QE <desktop-qa-list>
Severity: high Docs Contact:
Priority: medium    
Version: 6.7CC: aloughla, atragler, bgalvani, dcbw, lrintel, mleitner, rkhan, sukulkar, thaller, tschweikle
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-26 21:11:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Thomas Schweikle 2015-11-06 07:50:36 UTC
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
DEVICE="eth0"
BOOTPROTO=none
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Ethernet"
UUID="433d5c4b-a05e-4df6-9f37-75d8ff095587"
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
#HWADDR=00:50:56:A5:7C:9F
IPADDR=10.169.21.92
PREFIX=24
GATEWAY=10.169.21.254
DNS1=10.169.21.33
DOMAIN="rodos.somedomain.somecc somedomain.somecc"
DEFROUTE=yes
-- 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 23:45:01 UTC
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 15:21:35 UTC
Any chance you can provide the information I requested in comment 2?  Thanks!

Comment 4 Thomas Schweikle 2016-01-26 15:11:59 UTC
# 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 21:11:15 UTC
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:

http://redhat.com/rhel/lifecycle

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.