Переглянути джерело

Use default ports for dnsmasq and node dns

Scott Dodson 7 роки тому
батько
коміт
d9c30f08ce

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

@@ -12,4 +12,3 @@ os_firewall_allow:
 - service: Calico BGP Port
   port: 179/tcp
   when: openshift.common.use_calico | bool
-r_openshift_node_dns_port: "{{ openshift_node_dns_port | default(8054) }}"

+ 0 - 1
roles/openshift_node/meta/main.yml

@@ -45,5 +45,4 @@ dependencies:
     port: "{{ openshift_node_port_range | default('') }}/udp"
   when: openshift_node_port_range is defined
 - role: openshift_node_dnsmasq
-  r_openshift_node_dnsmasq_port: "{{ r_openshift_node_dns_port }}"
   when: openshift.common.use_dnsmasq | bool

+ 1 - 1
roles/openshift_node/templates/node.service.j2

@@ -14,7 +14,7 @@ Type=notify
 EnvironmentFile=/etc/sysconfig/{{ openshift.common.service_type }}-node
 Environment=GOTRACEBACK=crash
 ExecStartPre=/usr/bin/cp /etc/origin/node/node-dnsmasq.conf /etc/dnsmasq.d/
-ExecStartPre=/usr/bin/dbus-send --system --dest=uk.org.thekelleys.dnsmasq /uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetDomainServers array:string:/in-addr.arpa/127.0.0.1#{{ r_openshift_node_dns_port}},/{{ openshift.common.dns_domain }}/127.0.0.1#{{ r_openshift_node_dns_port}}
+ExecStartPre=/usr/bin/dbus-send --system --dest=uk.org.thekelleys.dnsmasq /uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetDomainServers array:string:/in-addr.arpa/127.0.0.1,/{{ openshift.common.dns_domain }}/127.0.0.1
 ExecStopPost=/usr/bin/rm /etc/dnsmasq.d/node-dnsmasq.conf
 ExecStopPost=/usr/bin/dbus-send --system --dest=uk.org.thekelleys.dnsmasq /uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetDomainServers array:string:
 ExecStart=/usr/bin/openshift start node --config=${CONFIG_FILE} $OPTIONS

+ 1 - 1
roles/openshift_node/templates/node.yaml.v1.j2

@@ -1,7 +1,7 @@
 allowDisabledDocker: false
 apiVersion: v1
 {% if openshift.common.version_gte_3_6 %}
-dnsBindAddress: 0.0.0.0:{{ r_openshift_node_dns_port }}
+dnsBindAddress: 127.0.0.1:53
 dnsRecursiveResolvConf: /etc/origin/node/resolv.conf
 {% endif %}
 dnsDomain: {{ openshift.common.dns_domain }}

Різницю між файлами не показано, бо вона завелика
+ 1 - 1
roles/openshift_node/templates/openshift.docker.node.service


+ 0 - 1
roles/openshift_node_dnsmasq/defaults/main.yml

@@ -1,2 +1 @@
 ---
-r_openshift_node_dnsmasq_port: 8054

+ 2 - 2
roles/openshift_node_dnsmasq/templates/node-dnsmasq.conf.j2

@@ -1,2 +1,2 @@
-server=/in-addr.arpa/127.0.0.1#{{ r_openshift_node_dnsmasq_port }}
-server=/{{ openshift.common.dns_domain }}/127.0.0.1#{{ r_openshift_node_dnsmasq_port }}
+server=/in-addr.arpa/127.0.0.1
+server=/{{ openshift.common.dns_domain }}/127.0.0.1

+ 2 - 0
roles/openshift_node_dnsmasq/templates/origin-dns.conf.j2

@@ -3,3 +3,5 @@ domain-needed
 no-negcache
 max-cache-ttl=1
 enable-dbus
+bind-interfaces
+listen-address={{ ansible_default_ipv4.address }}

+ 0 - 1
roles/openshift_node_upgrade/defaults/main.yml

@@ -1,2 +1 @@
 ---
-r_openshift_node_dns_port: "{{ openshift_node_dns_port | default(8054) }}"

+ 1 - 1
roles/openshift_node_upgrade/templates/node.service.j2

@@ -14,7 +14,7 @@ Type=notify
 EnvironmentFile=/etc/sysconfig/{{ openshift.common.service_type }}-node
 Environment=GOTRACEBACK=crash
 ExecStartPre=/usr/bin/cp /etc/origin/node/node-dnsmasq.conf /etc/dnsmasq.d/
-ExecStartPre=/usr/bin/dbus-send --system --dest=uk.org.thekelleys.dnsmasq /uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetDomainServers array:string:/in-addr.arpa/127.0.0.1#{{ r_openshift_node_dns_port}},/{{ openshift.common.dns_domain }}/127.0.0.1#{{ r_openshift_node_dns_port}}
+ExecStartPre=/usr/bin/dbus-send --system --dest=uk.org.thekelleys.dnsmasq /uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetDomainServers array:string:/in-addr.arpa/127.0.0.1,/{{ openshift.common.dns_domain }}/127.0.0.1
 ExecStopPost=/usr/bin/rm /etc/dnsmasq.d/node-dnsmasq.conf
 ExecStopPost=/usr/bin/dbus-send --system --dest=uk.org.thekelleys.dnsmasq /uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetDomainServers array:string:
 ExecStart=/usr/bin/openshift start node --config=${CONFIG_FILE} $OPTIONS

Різницю між файлами не показано, бо вона завелика
+ 1 - 1
roles/openshift_node_upgrade/templates/openshift.docker.node.service