From c4f63232dc88bd8eae5698b104011cbc7d7f98ea Mon Sep 17 00:00:00 2001 From: Bart Wensley Date: Mon, 28 Jan 2019 13:17:00 -0600 Subject: [PATCH] Ensure puppet dns config done after networking config In some labs, the puppet manifest application during config_controller results in the ::platform::network class being applied after the ::platform::dns class. This causes the /etc/resolv.conf file to be wiped (when the apply_network_config.sh is run by the ::platform::network class). The fix is to introduce a dependency to ensure that the networking config is completed before the dns config is done. Change-Id: Ie4a8b67e5eb3594f5c21e22f8014d2b8162a0758 Related-bug: 1812449 Signed-off-by: Bart Wensley --- puppet-manifests/src/modules/platform/manifests/dns.pp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/puppet-manifests/src/modules/platform/manifests/dns.pp b/puppet-manifests/src/modules/platform/manifests/dns.pp index 786c89a7c8..5ea7a9a4e3 100644 --- a/puppet-manifests/src/modules/platform/manifests/dns.pp +++ b/puppet-manifests/src/modules/platform/manifests/dns.pp @@ -93,8 +93,14 @@ class platform::dns::resolv ( class platform::dns { - include ::platform::dns::resolv - include ::platform::dns::dnsmasq + Anchor['platform::networking'] -> Class[$name] + + # The "contain" ensures that the resolv and dnsmasq classes are not applied + # until the dns class is begun, which will wait for networking to be + # complete, as per the anchor dependency above. This is necessary because + # the networking configuration can wipe the /etc/resolv.conf file. + contain ::platform::dns::resolv + contain ::platform::dns::dnsmasq }