summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSwann Croiset <scroiset@mirantis.com>2016-08-16 15:50:55 +0200
committerSwann Croiset <scroiset@mirantis.com>2016-08-16 16:23:42 +0000
commit7ee4a5b53b8a0f167076fba8351035a492f2e66c (patch)
tree83b4e1a345dd4830330f08e1b37c65d86b49c032
parent6637b2cffcd87c4d55bce4a200f487e24869f0d7 (diff)
Fixes the concurrent execution of logrotate0.9-eol
Notes
Notes (review): Code-Review+1: Serhii Lystopad <slystopad@mirantis.com> Code-Review+2: Simon Pasquier <spasquier@mirantis.com> Workflow+1: Simon Pasquier <spasquier@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Tue, 23 Aug 2016 14:46:33 +0000 Reviewed-on: https://review.openstack.org/356048 Project: openstack/fuel-plugin-lma-collector Branch: refs/heads/stable/0.9
-rw-r--r--deployment_scripts/puppet/modules/heka/templates/logrotate.cron.erb4
1 files changed, 2 insertions, 2 deletions
diff --git a/deployment_scripts/puppet/modules/heka/templates/logrotate.cron.erb b/deployment_scripts/puppet/modules/heka/templates/logrotate.cron.erb
index 52edb61..e9d0ca1 100644
--- a/deployment_scripts/puppet/modules/heka/templates/logrotate.cron.erb
+++ b/deployment_scripts/puppet/modules/heka/templates/logrotate.cron.erb
@@ -21,7 +21,7 @@ fail() {
21 else 21 else
22 MESSAGE=$1 22 MESSAGE=$1
23 fi 23 fi
24 /usr/bin/logger -t logrotate "${MESSAGE}" 24 /usr/bin/logger -t logrotate "<%= @service_name %> ${MESSAGE}"
25 unlock 25 unlock
26 exit 1 26 exit 1
27} 27}
@@ -30,7 +30,7 @@ lock || fail "WARNING <%= @service_name %> logrotate flock failed, exiting"
30 30
31 31
32TMP_FILE=$(/bin/mktemp) 32TMP_FILE=$(/bin/mktemp)
33nice ionice -c3 /usr/sbin/logrotate <%= @logrotate_conf %> >& $TMP_FILE 33nice ionice -c3 /usr/sbin/logrotate -s /var/lib/logrotate/<%= @service_name %>.status <%= @logrotate_conf %> >& $TMP_FILE
34EXITVALUE=$? 34EXITVALUE=$?
35 35
36if [ -f /etc/redhat-release ] || [ -f /etc/centos-release ]; 36if [ -f /etc/redhat-release ] || [ -f /etc/centos-release ];