From dccba790ae72dc4e9ead001d17f8e5eecccd9140 Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Tue, 28 Mar 2017 22:39:40 +0200 Subject: [PATCH] Move NTP management into openstack_project::server Once nodepool is building images with NTP already installed and enabled, we don't need to manage it in the common openstack_project::template class. This patch moves them over to openstack_project::server so that it is obvious that puppet doesn't need to manage them for both single-use workers and long-lived servers. Eventually the openstack_project::template class should be empty and we can remove it. Depends-On: Iee6babc183dd12cc82ce76ddfde04f2d98ddc4d6 Change-Id: Ie808a5b62014716c8506506fd15f39dba06e76b6 --- modules/openstack_project/manifests/server.pp | 26 +++++++++++++++++++ .../openstack_project/manifests/template.pp | 26 ------------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/modules/openstack_project/manifests/server.pp b/modules/openstack_project/manifests/server.pp index 53f412a712..35b49fec8f 100644 --- a/modules/openstack_project/manifests/server.pp +++ b/modules/openstack_project/manifests/server.pp @@ -48,6 +48,32 @@ class openstack_project::server ( ensure => present } + ########################################################### + # Manage ntp + + include '::ntp' + + if ($::osfamily == "RedHat") { + # Utils in ntp-perl are included in Debian's ntp package; we + # add it here for consistency. See also + # https://tickets.puppetlabs.com/browse/MODULES-3660 + 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'], + } + } + class { 'openstack_project::template': iptables_public_tcp_ports => $iptables_public_tcp_ports, iptables_public_udp_ports => $iptables_public_udp_ports, diff --git a/modules/openstack_project/manifests/template.pp b/modules/openstack_project/manifests/template.pp index aecfa04dd2..7d72bf3db2 100644 --- a/modules/openstack_project/manifests/template.pp +++ b/modules/openstack_project/manifests/template.pp @@ -167,32 +167,6 @@ class openstack_project::template ( } } - ########################################################### - # Manage ntp - - include '::ntp' - - if ($::osfamily == "RedHat") { - # Utils in ntp-perl are included in Debian's ntp package; we - # add it here for consistency. See also - # https://tickets.puppetlabs.com/browse/MODULES-3660 - 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'], - } - } - ########################################################### # Manage python/pip