Skip to content

Commit

Permalink
Do not remove upstream DNS configuraton in cleanup
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mkowalski committed Jul 24, 2021
1 parent 87b31db commit f31be61
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions host_cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f31be61

Please sign in to comment.