diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2020-01-15 18:05:55 +0100 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2020-01-17 10:20:25 +0000 |
commit | 2dc42cd75a3fc5ee4147c4180ba78ad415b09381 (patch) | |
tree | e152b7cbb530b8ac349130b6b2ef20a69e855b7e | |
parent | 238ed19eb4d7cd755bbc95c40e2399cc66eb6fc1 (diff) |
all: Actually honor public DNS set in IDF
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>
(cherry picked from commit 4deaa15d1e8a9e0e7e0bfb26d4cf3c1b2450c1a1)
3 files changed, 15 insertions, 6 deletions
diff --git a/mcp/reclass/classes/cluster/all-mcp-arch-common/infra/maas.yml.j2 b/mcp/reclass/classes/cluster/all-mcp-arch-common/infra/maas.yml.j2 index b8c525822..57da919de 100644 --- a/mcp/reclass/classes/cluster/all-mcp-arch-common/infra/maas.yml.j2 +++ b/mcp/reclass/classes/cluster/all-mcp-arch-common/infra/maas.yml.j2 @@ -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 diff --git a/mcp/reclass/classes/cluster/all-mcp-arch-common/opnfv/init.yml.j2 b/mcp/reclass/classes/cluster/all-mcp-arch-common/opnfv/init.yml.j2 index 54f268226..2e88d9cdc 100644 --- a/mcp/reclass/classes/cluster/all-mcp-arch-common/opnfv/init.yml.j2 +++ b/mcp/reclass/classes/cluster/all-mcp-arch-common/opnfv/init.yml.j2 @@ -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 %} diff --git a/mcp/scripts/docker-compose/docker-compose.yaml.j2 b/mcp/scripts/docker-compose/docker-compose.yaml.j2 index 82c4178b6..04dc93f98 100644 --- a/mcp/scripts/docker-compose/docker-compose.yaml.j2 +++ b/mcp/scripts/docker-compose/docker-compose.yaml.j2 @@ -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 %} |