]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
dnsmasq is not actually restarting 749/head
authorRobin H. Johnson <robbat2@gentoo.org>
Mon, 7 Dec 2015 23:44:08 +0000 (15:44 -0800)
committerLoic Dachary <ldachary@redhat.com>
Tue, 15 Dec 2015 11:06:05 +0000 (12:06 +0100)
The init.d fres, but does nothing.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
teuthology/openstack/setup-openstack.sh

index 1a2c727b559ed40e8e1c60277d12885283a750d1..097a1023d86e4fb24d83d5335ab256cea06e210b 100755 (executable)
@@ -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"