Преглед на файлове

Merge pull request #8187 from digi691/no_negcache

Fix issue with dnsmasq not caching NXDOMAIN
Scott Dodson преди 7 години
родител
ревизия
edf2b70c36
променени са 2 файла, в които са добавени 9 реда и са изтрити 0 реда
  1. 5 0
      roles/openshift_node/defaults/main.yml
  2. 4 0
      roles/openshift_node/templates/origin-dns.conf.j2

+ 5 - 0
roles/openshift_node/defaults/main.yml

@@ -90,6 +90,11 @@ openshift_node_dnsmasq_install_network_manager_hook: true
 openshift_node_dnsmasq_except_interfaces:
 - lo
 
+# dnsmasq defaults to neg caching disabled
+openshift_node_dnsmasq_no_negcache: true
+# When openshift_node_dnsmasq_no_negcache is set to false, how many seconds to cache negative lookups.
+openshift_node_dnsmasq_neg_ttl: '1'
+
 r_openshift_node_firewall_enabled: "{{ os_firewall_enabled | default(True) }}"
 r_openshift_node_use_firewalld: "{{ os_firewall_use_firewalld | default(False) }}"
 

+ 4 - 0
roles/openshift_node/templates/origin-dns.conf.j2

@@ -1,6 +1,10 @@
 no-resolv
 domain-needed
+{% if openshift_node_dnsmasq_no_negcache %}
 no-negcache
+{% else %}
+neg-ttl={{ openshift_node_dnsmasq_neg_ttl }}
+{% endif %}
 max-cache-ttl=1
 enable-dbus
 dns-forward-max=10000