resolv.conf on CentOS 7/RHEL 7 is NetworkManager managed

Bug #1620807 reported by Bert JW Regeer on 2016-09-06
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cloud-init
Medium
Unassigned

Bug Description

Related to https://bugs.launchpad.net/cloud-init/+bug/1620796 I have found that even when I have fixed cloud-init to properly write resolv.conf it gets overwritten as soon as network is started because NetworkManager takes over control:

/etc/resolv.conf

# Generated by NetworkManager
search novalocal

# 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

instead any DNS entries should be added directly to the ifcfg-eth* files that are generated, then let NM figure out what DNS resolvers it wants to add to /etc/resolv.conf.

Related branches

tags: added: rhel
tags: added: centos
Bert JW Regeer (bregeer-ctl) wrote :

I've resolved this in this branch: https://code.launchpad.net/~bregeer-ctl/cloud-init/+git/cloud-init/+ref/bugfix/centos7_resolv

Launchpad is unable to find it though, so I can't link it.

Scott Moser (smoser) on 2016-09-07
Changed in cloud-init:
status: New → Confirmed
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers