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 <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2016-08-01 16:37:57 -04:00
parent 27c125df4b
commit 3f5c72fa92
No known key found for this signature in database
GPG Key ID: 611A80832067AF38
1 changed files with 12 additions and 0 deletions

View File

@ -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'],
}
}
###########################################################