From 505c556c677fa518f8c97c699708999b844dd962 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 28 Oct 2020 09:07:46 -0700 Subject: [PATCH] support_server: disable systemd-resolved We're setting up our own (dnsmasq) name server, we can't have resolved running. Signed-off-by: Adam Williamson --- tests/_support_server.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/_support_server.pm b/tests/_support_server.pm index 5aa38b59..f335779d 100644 --- a/tests/_support_server.pm +++ b/tests/_support_server.pm @@ -94,6 +94,13 @@ sub _pxe_setup { sub run { my $self=shift; + # disable systemd-resolved, it conflicts with dnsmasq + unless (script_run "systemctl is-active systemd-resolved.service") { + script_run "systemctl stop systemd-resolved.service"; + script_run "systemctl disable systemd-resolved.service"; + script_run "rm -f /etc/resolv.conf"; + script_run "systemctl restart NetworkManager"; + } ## DNS / DHCP (dnsmasq) # create config assert_script_run "printf 'domain=domain.local\ndhcp-range=172.16.2.150,172.16.2.199\ndhcp-option=option:router,172.16.2.2\n' > /etc/dnsmasq.conf";