From: Robin H. Johnson Date: Mon, 7 Dec 2015 23:44:08 +0000 (-0800) Subject: dnsmasq is not actually restarting X-Git-Tag: 1.1.0~715^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=8d7961511b2dbd9f0265fb4d6bf985a13f9d4168;p=teuthology.git dnsmasq is not actually restarting The init.d fres, but does nothing. Signed-off-by: Robin H. Johnson --- diff --git a/teuthology/openstack/setup-openstack.sh b/teuthology/openstack/setup-openstack.sh index 1a2c727b55..097a1023d8 100755 --- a/teuthology/openstack/setup-openstack.sh +++ b/teuthology/openstack/setup-openstack.sh @@ -321,7 +321,9 @@ function setup_dnsmasq() { sudo apt-get -qq install -y dnsmasq resolvconf echo resolv-file=/etc/dnsmasq-resolv.conf | sudo tee /etc/dnsmasq.d/resolv echo nameserver $resolver | sudo tee /etc/dnsmasq-resolv.conf - sudo /etc/init.d/dnsmasq restart + # restart is not always picking up changes + sudo /etc/init.d/dnsmasq stop || true + sudo /etc/init.d/dnsmasq start sudo sed -ie 's/^#IGNORE_RESOLVCONF=yes/IGNORE_RESOLVCONF=yes/' /etc/default/dnsmasq echo nameserver 127.0.0.1 | sudo tee /etc/resolvconf/resolv.conf.d/head sudo resolvconf -u @@ -350,7 +352,9 @@ function define_dnsmasq() { done | sudo tee $host_records > /tmp/dnsmasq head -2 /tmp/dnsmasq echo 'etc.' - sudo /etc/init.d/dnsmasq restart + # restart is not always picking up changes + sudo /etc/init.d/dnsmasq stop || true + sudo /etc/init.d/dnsmasq start echo "CREATED $host_records" else echo "OK $host_records exists"