From 99508dbc3919863330d9a879529b330fdd1d5dff Mon Sep 17 00:00:00 2001 From: Swann Croiset Date: Tue, 16 Aug 2016 15:50:55 +0200 Subject: [PATCH] Fixes the concurrent execution of logrotate Change-Id: I1546744d3c4cab8fc359b6571d99aabde3c3ff2d Closes-bug: #1455104 --- .../puppet/modules/heka/templates/logrotate.cron.erb | 4 ++-- 1 file 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 52edb61af..e9d0ca132 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() { else MESSAGE=$1 fi - /usr/bin/logger -t logrotate "${MESSAGE}" + /usr/bin/logger -t logrotate "<%= @service_name %> ${MESSAGE}" unlock exit 1 } @@ -30,7 +30,7 @@ lock || fail "WARNING <%= @service_name %> logrotate flock failed, exiting" TMP_FILE=$(/bin/mktemp) -nice ionice -c3 /usr/sbin/logrotate <%= @logrotate_conf %> >& $TMP_FILE +nice ionice -c3 /usr/sbin/logrotate -s /var/lib/logrotate/<%= @service_name %>.status <%= @logrotate_conf %> >& $TMP_FILE EXITVALUE=$? if [ -f /etc/redhat-release ] || [ -f /etc/centos-release ];