From 8f8176ca03b6bb36642f17c55230262b27a3402b Mon Sep 17 00:00:00 2001 From: Don Penney Date: Wed, 29 May 2019 01:07:58 -0400 Subject: [PATCH] Puppet manifests missing networking dependencies During initial unlock of the controller, we see memcached thrashing on startup for several minutes. In addition, NTP date setting hangs for a couple of minutes before failing. Both cases are due to the services being launched in the puppet manifest before the networking configuration is done, and both need networking configured to run successfully. This update adds a dependency against networking configuration for both memcached and NTP setup in the manifests. For NTP on the controller, the dependency is added against DNS configuration, which in turn is dependent on networking config. This ensures DNS config is also complete before attempting NTP setup, which may use hostnames for NTP servers. Closes-Bug: 1830805 Change-Id: I8f9f612e3aad3ad71a511d0d5415e2a05acbc0c1 Signed-off-by: Don Penney --- .../src/modules/platform/manifests/memcached.pp | 4 +++- puppet-manifests/src/modules/platform/manifests/ntp.pp | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/puppet-manifests/src/modules/platform/manifests/memcached.pp b/puppet-manifests/src/modules/platform/manifests/memcached.pp index 898e0ff57..0fb5b9bfe 100644 --- a/puppet-manifests/src/modules/platform/manifests/memcached.pp +++ b/puppet-manifests/src/modules/platform/manifests/memcached.pp @@ -37,7 +37,9 @@ class platform::memcached::params( class platform::memcached inherits ::platform::memcached::params { - class { '::memcached': + Anchor['platform::networking'] + + -> class { '::memcached': package_ensure => $package_ensure, logfile => $logfile, listen_ip => $listen_ip, diff --git a/puppet-manifests/src/modules/platform/manifests/ntp.pp b/puppet-manifests/src/modules/platform/manifests/ntp.pp index 026960843..e8df46e18 100644 --- a/puppet-manifests/src/modules/platform/manifests/ntp.pp +++ b/puppet-manifests/src/modules/platform/manifests/ntp.pp @@ -68,6 +68,14 @@ class platform::ntp ( hasstatus => true, hasrestart => true, } + + if $::personality == 'controller' { + Class['::platform::dns'] + -> Exec['enable-ntpdate'] + } else { + Anchor['platform::networking'] + -> Exec['enable-ntpdate'] + } } else { exec { 'disable-ntpdate': command => '/usr/bin/systemctl disable ntpdate.service',