Red Hat Bugzilla – Bug 1278693
resolv.conf empty after reboot
Last modified: 2017-10-26 17:11:15 EDT
Description of problem:
After rebooting resolv.conf is empty. Sometimes domain is set, but not reliably:
# 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:
# DOMAIN=lab.foo.com bar.foo.com
# cat /etc/sysconfig/network-scripts/ifcfg-eth0
settings are ignored. NetworkManager is installed and started by desktop-gui.
Version-Release number of selected component (if applicable):
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.
NetworkManager resets /etc/resolv.conf to only hold "search hostnames-domain"
System looses capability to resolve network names
NetworkManager should not even try to overwrite /etc/resolv.conf, only add to configurations found there.
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.
Any chance you can provide the information I requested in comment 2? Thanks!
# 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 ...
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.