summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Gugino <mgugino@redhat.com>2017-10-25 17:01:26 -0400
committerMichael Gugino <mgugino@redhat.com>2017-10-25 17:03:27 -0400
commitdb50b11f29ee95fa6128257141bba9c39fe36de3 (patch)
treed3180f0ea9b9892b08f8f854b019c0d0edd7bfec
parent2055aa066d8219393db64f42afc384c8123f48f2 (diff)
downloadopenshift-db50b11f29ee95fa6128257141bba9c39fe36de3.tar.gz
openshift-db50b11f29ee95fa6128257141bba9c39fe36de3.tar.bz2
openshift-db50b11f29ee95fa6128257141bba9c39fe36de3.tar.xz
openshift-db50b11f29ee95fa6128257141bba9c39fe36de3.zip
Change dnsmasq to bind-interfaces + except-interfaces
Currently, we have to set the listen ip for dnsmasq via ansible during installation. This commit enables dnsmasq to bind-interfaces + exclude interfaces to ensure dnsmasq doesn't listen on lo interface.
-rw-r--r--roles/openshift_node_dnsmasq/defaults/main.yml5
-rw-r--r--roles/openshift_node_dnsmasq/templates/origin-dns.conf.j25
2 files changed, 9 insertions, 1 deletions
diff --git a/roles/openshift_node_dnsmasq/defaults/main.yml b/roles/openshift_node_dnsmasq/defaults/main.yml
index eae832fcf..ebcff46b5 100644
--- a/roles/openshift_node_dnsmasq/defaults/main.yml
+++ b/roles/openshift_node_dnsmasq/defaults/main.yml
@@ -1,2 +1,7 @@
---
openshift_node_dnsmasq_install_network_manager_hook: true
+
+# lo must always be present in this list or dnsmasq will conflict with
+# the node's dns service.
+openshift_node_dnsmasq_except_interfaces:
+- lo
diff --git a/roles/openshift_node_dnsmasq/templates/origin-dns.conf.j2 b/roles/openshift_node_dnsmasq/templates/origin-dns.conf.j2
index ef3ba2880..5c9601277 100644
--- a/roles/openshift_node_dnsmasq/templates/origin-dns.conf.j2
+++ b/roles/openshift_node_dnsmasq/templates/origin-dns.conf.j2
@@ -4,4 +4,7 @@ no-negcache
max-cache-ttl=1
enable-dbus
bind-interfaces
-listen-address={{ openshift.node.dns_ip }}
+{% for interface in openshift_node_dnsmasq_except_interfaces %}
+except-interface={{ interface }}
+{% endfor %}
+# End of config