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 <barton.wensley@windriver.com>
This commit is contained in:
Bart Wensley 2019-01-28 13:17:00 -06:00
parent 4d62be583e
commit c4f63232dc
1 changed files with 8 additions and 2 deletions

View File

@ -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
}