From f31be6136d2843394c917da4b32f4e5c3f007423 Mon Sep 17 00:00:00 2001 From: Mat Kowalski Date: Sat, 24 Jul 2021 13:48:44 +0200 Subject: [PATCH] Do not remove upstream DNS configuraton in cleanup This PR changes the logic of host cleanup so that the upstream DNS configuration is not removed. This comes from the fact that by default dev-scripts configure NetworkManager to use dnsmasq with DHCP-provided DNS servers and removes the existing /etc/resolv.conf configuration. This causes problems in environments configured without DHCP with DNS servers configured manually without use of the NetworkManager. With this PR user can use `ADDN_DNS` variable to provide their own DNS servers that will be passed to the dnsmasq and will not be removed when dev-scripts are cleaned up. Even though this does not cause the changes to be completely reverted (user will still end up with NetworkManager + dnsmasq), it does not leave the machine with no DNS servers at all. --- host_cleanup.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/host_cleanup.sh b/host_cleanup.sh index f508f7280..1393e3a16 100755 --- a/host_cleanup.sh +++ b/host_cleanup.sh @@ -32,8 +32,6 @@ ansible-playbook \ -b -vvv ${VM_SETUP_PATH}/teardown-playbook.yml sudo rm -rf /etc/NetworkManager/dnsmasq.d/openshift-${CLUSTER_NAME}.conf /etc/yum.repos.d/delorean* -sudo rm -rf /etc/NetworkManager/conf.d/dnsmasq.conf -sudo rm -rf /etc/NetworkManager/dnsmasq.d/upstream.conf if systemctl is-active --quiet NetworkManager; then sudo systemctl reload NetworkManager else