From 3f5c72fa92581a625f00546f2581afac07df754b Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Mon, 1 Aug 2016 16:37:57 -0400 Subject: [PATCH] Enable ntpdate service for centos-7 We need to ensure ntpdate service starts on boot for centos-7. Currently, ntpd explicitly require ntpdate to be running before the sync process can happen in ntpd. As a result, if ntpdate is not running, ntpd will start but fail to sync because of DNS cannot be resolved. If the clock is not already synced when ntpd starts, it will enter a synchronisation phase for a default of 900s that holds up ntp-wait. Change-Id: I98029a288c9a57f4b4b278b0dfb185609989662d Signed-off-by: Paul Belanger --- modules/openstack_project/manifests/template.pp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/openstack_project/manifests/template.pp b/modules/openstack_project/manifests/template.pp index deb327cbcc..9ce66f3541 100644 --- a/modules/openstack_project/manifests/template.pp +++ b/modules/openstack_project/manifests/template.pp @@ -242,6 +242,18 @@ class openstack_project::template ( package { 'ntp-perl': ensure => present } + # NOTE(pabelanger): We need to ensure ntpdate service starts on boot for + # centos-7. Currently, ntpd explicitly require ntpdate to be running before + # the sync process can happen in ntpd. As a result, if ntpdate is not + # running, ntpd will start but fail to sync because of DNS is not properly + # setup. + package { 'ntpdate': + ensure => present, + } + service { 'ntpdate': + enable => true, + require => Package['ntpdate'], + } } ###########################################################