From 155d50f0cb887d184cf7090e9b34cae594c6bebd Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 12 Nov 2013 22:01:36 -0500 Subject: [PATCH] Apply sysctls before restarting postgres. (imported from commit bc1f1ce1b880962640b8ed5f516139eaf91cb1db) --- puppet/zulip/manifests/enterprise.pp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/puppet/zulip/manifests/enterprise.pp b/puppet/zulip/manifests/enterprise.pp index c30b2cc89b..1fe2f83ec5 100644 --- a/puppet/zulip/manifests/enterprise.pp +++ b/puppet/zulip/manifests/enterprise.pp @@ -59,6 +59,12 @@ vm.dirty_background_ratio = 5 " } + exec { "sysctl_p": + command => "/sbin/sysctl -p /etc/sysctl.d/40-postgresql.conf", + subscribe => File['/etc/sysctl.d/40-postgresql.conf'], + refreshonly => true, + } + exec { 'pgtune': require => Package[pgtune], # Let Postgres use half the memory on the machine @@ -68,6 +74,7 @@ vm.dirty_background_ratio = 5 } exec { 'pg_ctlcluster 9.1 main restart': + require => Exec["sysctl_p"], refreshonly => true, subscribe => [ Exec['pgtune'], File['/etc/sysctl.d/40-postgresql.conf'] ] }