From 368bb77ee36d3bdae42cf77e57cfaa2718f383f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Jeanneret?= Date: Wed, 23 Nov 2022 15:11:44 +0100 Subject: [PATCH] Ensure NetworkManager doesn't override /etc/resolv.conf Until now, whenever NetworkManager gets reloaded/restarted/lease refresh, it would override the /etc/resolv.conf file with the nameservers and related it gets from the network. This patch ensures this won't happen ever again. Change-Id: I92bc12b8f712e28962d24dd6474cfce22b81222c --- .../nodepool-base/finalise.d/89-boot-settings | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/nodepool/elements/nodepool-base/finalise.d/89-boot-settings b/nodepool/elements/nodepool-base/finalise.d/89-boot-settings index 62868c717a..2b36d183a8 100755 --- a/nodepool/elements/nodepool-base/finalise.d/89-boot-settings +++ b/nodepool/elements/nodepool-base/finalise.d/89-boot-settings @@ -159,6 +159,18 @@ set -e echo 'nameserver 127.0.0.1' > /etc/resolv.conf EOF + +# Configure NetworkManager to not manage /etc/resolv.conf +if [ -d /etc/NetworkManager/conf.d ]; then + cat <>$rclocal <