From 5604b4c59e73472d3aa14d08c27a9e1bf1a7948b Mon Sep 17 00:00:00 2001 From: Joakim Sernbrant Date: Tue, 21 Feb 2017 16:39:42 +0100 Subject: [PATCH] CLOUDSTACK-9746 system-vm: logrotate config causes critical failures * rotate both daily and by size by using maxsize in stead of size * decrease the max size to 10M for rsyslog files * remove delaycompress for rsyslog files * increase rotate to 10 for cloud.log --- systemvm/patches/debian/config/etc/logrotate.d/apache2 | 2 +- systemvm/patches/debian/config/etc/logrotate.d/cloud | 4 ++-- systemvm/patches/debian/config/etc/logrotate.d/conntrackd | 2 +- systemvm/patches/debian/config/etc/logrotate.d/dnsmasq | 2 +- systemvm/patches/debian/config/etc/logrotate.d/haproxy | 2 +- systemvm/patches/debian/config/etc/logrotate.d/ppp | 2 +- systemvm/patches/debian/config/etc/logrotate.d/rsyslog | 6 ++---- 7 files changed, 9 insertions(+), 11 deletions(-) diff --git a/systemvm/patches/debian/config/etc/logrotate.d/apache2 b/systemvm/patches/debian/config/etc/logrotate.d/apache2 index 3932c274825..58ddb4dede5 100644 --- a/systemvm/patches/debian/config/etc/logrotate.d/apache2 +++ b/systemvm/patches/debian/config/etc/logrotate.d/apache2 @@ -4,6 +4,6 @@ rotate 3 compress dateext - size 10M + maxsize 10M notifempty } diff --git a/systemvm/patches/debian/config/etc/logrotate.d/cloud b/systemvm/patches/debian/config/etc/logrotate.d/cloud index 420fce23e18..bf0ec747c4d 100644 --- a/systemvm/patches/debian/config/etc/logrotate.d/cloud +++ b/systemvm/patches/debian/config/etc/logrotate.d/cloud @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. /var/log/cloud.log { - rotate 4 + rotate 10 daily - size 10M + maxsize 10M missingok notifempty compress diff --git a/systemvm/patches/debian/config/etc/logrotate.d/conntrackd b/systemvm/patches/debian/config/etc/logrotate.d/conntrackd index 0229cd7e8c5..89f560d1b95 100644 --- a/systemvm/patches/debian/config/etc/logrotate.d/conntrackd +++ b/systemvm/patches/debian/config/etc/logrotate.d/conntrackd @@ -1,6 +1,6 @@ /var/log/conntrackd-stats.log { daily - size 10M + maxsize 10M rotate 2 missingok compress diff --git a/systemvm/patches/debian/config/etc/logrotate.d/dnsmasq b/systemvm/patches/debian/config/etc/logrotate.d/dnsmasq index 2f917855190..9fb70f02fc8 100644 --- a/systemvm/patches/debian/config/etc/logrotate.d/dnsmasq +++ b/systemvm/patches/debian/config/etc/logrotate.d/dnsmasq @@ -1,6 +1,6 @@ /var/log/dnsmasq.log { daily - size 10M + maxsize 10M missingok rotate 5 notifempty diff --git a/systemvm/patches/debian/config/etc/logrotate.d/haproxy b/systemvm/patches/debian/config/etc/logrotate.d/haproxy index 858fe2a1c3a..1c8110bd751 100644 --- a/systemvm/patches/debian/config/etc/logrotate.d/haproxy +++ b/systemvm/patches/debian/config/etc/logrotate.d/haproxy @@ -3,7 +3,7 @@ rotate 5 missingok notifempty - size 10M + maxsize 10M postrotate /bin/kill -HUP `cat /var/run/rsyslog.pid 2> /dev/null` 2> /dev/null || true endscript diff --git a/systemvm/patches/debian/config/etc/logrotate.d/ppp b/systemvm/patches/debian/config/etc/logrotate.d/ppp index 2004e77ff0f..2d70f6aef49 100644 --- a/systemvm/patches/debian/config/etc/logrotate.d/ppp +++ b/systemvm/patches/debian/config/etc/logrotate.d/ppp @@ -1,6 +1,6 @@ /var/log/ppp-connect-errors { daily - size 10M + maxsize 10M rotate 5 missingok notifempty diff --git a/systemvm/patches/debian/config/etc/logrotate.d/rsyslog b/systemvm/patches/debian/config/etc/logrotate.d/rsyslog index 5803c43d875..9397f41d04a 100644 --- a/systemvm/patches/debian/config/etc/logrotate.d/rsyslog +++ b/systemvm/patches/debian/config/etc/logrotate.d/rsyslog @@ -2,10 +2,9 @@ { rotate 7 daily - size 50M + maxsize 10M missingok notifempty - delaycompress compress postrotate /usr/sbin/invoke-rc.d rsyslog rotate > /dev/null @@ -27,11 +26,10 @@ { rotate 10 daily - size 50M + maxsize 10M missingok notifempty compress - delaycompress sharedscripts postrotate /usr/sbin/invoke-rc.d rsyslog rotate > /dev/null