From 55ee496ddf8ee327369dafa66d8896fab5822c38 Mon Sep 17 00:00:00 2001 From: Oleksiy Molchanov Date: Thu, 12 Mar 2015 16:17:39 +0200 Subject: [PATCH] Set 0644 mode for ntp and dnsmasq services Set 0644 mode for ntp and dnsmasq services, because they can potentially break work of corosync resources. You cannot start services by using /etc/init.d/ link for these services now. DocImpact Change-Id: I5935f1230e98eddfe4a73d0ce1cb9b5c23df40f5 Closes-Bug: 1431357 --- .../puppet/cluster/manifests/dns_ocf.pp | 5 +++++ .../puppet/cluster/manifests/ntp_ocf.pp | 21 +++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/deployment/puppet/cluster/manifests/dns_ocf.pp b/deployment/puppet/cluster/manifests/dns_ocf.pp index e02f03ea28..5bfd0b3bd8 100644 --- a/deployment/puppet/cluster/manifests/dns_ocf.pp +++ b/deployment/puppet/cluster/manifests/dns_ocf.pp @@ -38,6 +38,11 @@ class cluster::dns_ocf ( $primary_controller ) { Cs_resource[$service_name] ~> Service[$service_name] } + file { '/etc/init.d/dnsmasq': + ensure => present, + mode => '0644', + } -> + file {'dns-ocf': path =>'/usr/lib/ocf/resource.d/fuel/ns_dns', mode => '0755', diff --git a/deployment/puppet/cluster/manifests/ntp_ocf.pp b/deployment/puppet/cluster/manifests/ntp_ocf.pp index 6204c34eba..bd3c0c1c21 100644 --- a/deployment/puppet/cluster/manifests/ntp_ocf.pp +++ b/deployment/puppet/cluster/manifests/ntp_ocf.pp @@ -38,6 +38,17 @@ class cluster::ntp_ocf ( $primary_controller ) { Cs_resource[$service_name] ~> Service[$service_name] } + $service_path = $osfamily ? { + /(RedHat|CentOS)/ => '/etc/init.d/ntpd', + /(Debian|Ubuntu)/ => '/etc/init.d/ntp', + default => '/etc/init.d/ntp', + } + + file { $service_path: + ensure => present, + mode => '0644', + } -> + file {'ntp-ocf': path =>'/usr/lib/ocf/resource.d/fuel/ns_ntp', mode => '0755', @@ -47,11 +58,9 @@ class cluster::ntp_ocf ( $primary_controller ) { } ~> service { $service_name: - name => $service_name, - enable => true, - ensure => 'running', - hasstatus => true, - hasrestart => true, - provider => 'pacemaker', + name => $service_name, + enable => true, + ensure => 'running', + provider => 'pacemaker', } }