Bug Upon modifyin DNS entry in DHCP server - SNO OCP platform does not update resolv.conf
Changing force dns script for sno , now it will recreate resolv.conf
every network manager restart
@@ -97,7 +97,6 @@ const forceDnsDispatcherScript = `
export IP="{{.HOST_IP}}"
export BASE_RESOLV_CONF=/run/NetworkManager/resolv.conf
if [ "$2" = "dhcp4-change" ] || [ "$2" = "dhcp6-change" ] || [ "$2" = "up" ] || [ "$2" = "connectivity-change" ]; then
- if ! grep -q "$IP" /etc/resolv.conf; then
export TMP_FILE=$(mktemp /etc/forcedns_resolv.conf.XXXXXX)
cp $BASE_RESOLV_CONF $TMP_FILE
chmod --reference=$BASE_RESOLV_CONF $TMP_FILE
@@ -106,7 +105,6 @@ if [ "$2" = "dhcp4-change" ] || [ "$2" = "dhcp6-change" ] || [ "$2" = "up" ] ||
-e "0,/nameserver/s/nameserver/& $IP\n&/" $TMP_FILE
mv $TMP_FILE /etc/resolv.conf
fi
-fi
`
const dnsMachineConfigManifest = `
