all: Actually honor public DNS set in IDF 61/69561/1
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Wed, 15 Jan 2020 17:05:55 +0000 (18:05 +0100)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Thu, 16 Jan 2020 15:34:16 +0000 (16:34 +0100)
We currently do not configure linux:network:resolv:dns via reclass
pillar data, so we don't actually enforce the public DNS set in
the IDF file, but instead leave it to the OS to figure it out, which
most of the time works fine, but it's not completely reliable.

Change that behavior to instead enforce it via linux.network.resolv
state across all cluster nodes.

Change-Id: I4f82315a473fcbdc8573380cfcac1e30b44c3dd4
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
mcp/reclass/classes/cluster/all-mcp-arch-common/infra/maas.yml.j2
mcp/reclass/classes/cluster/all-mcp-arch-common/opnfv/init.yml.j2
mcp/scripts/docker-compose/docker-compose.yaml.j2

index b8c5258..57da919 100644 (file)
@@ -122,12 +122,6 @@ parameters:
       ~kernel:
         sysctl:
           net.ipv4.ip_forward: 1
-    network:
-      resolv:
-        dns:
-{%- for server in nm.dns_public %}
-          - {{ server }}
-{%- endfor %}
   iptables:
     schema:
       epoch: 1
index 54f2682..2e88d9c 100644 (file)
@@ -31,3 +31,10 @@ parameters:
     minion:
       tcp_keepalive: True
       tcp_keepalive_idle: 60
+  linux:
+    network:
+      resolv:
+        dns:
+{%- for server in nm.dns_public %}
+          - {{ server }}
+{%- endfor %}
index 82c4178..04dc93f 100644 (file)
@@ -37,6 +37,10 @@ services:
     hostname: cfg01
     domainname: {{ conf.cluster.domain }}
     privileged: true
+    dns:
+{%- for server in nm.dns_public %}
+      - {{ server }}
+{%- endfor %}
 {%- if nm.cluster.has_baremetal_nodes %}
   opnfv-fuel-maas:
     container_name: "maas"
@@ -63,6 +67,10 @@ services:
     hostname: mas01
     domainname: {{ conf.cluster.domain }}
     privileged: true
+    dns:
+{%- for server in nm.dns_public %}
+      - {{ server }}
+{%- endfor %}
     ports:
       - 5240:5240
 {%- endif %}