From 308489a44694f85860cbbe8a0f2b31d31925c01e Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Mon, 24 Apr 2017 18:40:33 +0000 Subject: [PATCH 1/3] Fix unit specifier ('MB' -> 'M') --- files/image_config/systemd/journald.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/image_config/systemd/journald.conf b/files/image_config/systemd/journald.conf index fc6c4a4e7a1a..c32fbae57051 100644 --- a/files/image_config/systemd/journald.conf +++ b/files/image_config/systemd/journald.conf @@ -15,10 +15,10 @@ #SyncIntervalSec=5m #RateLimitInterval=30s #RateLimitBurst=1000 -SystemMaxUse=50MB +SystemMaxUse=50M #SystemKeepFree= #SystemMaxFileSize= -RuntimeMaxUse=50MB +RuntimeMaxUse=50M #RuntimeKeepFree= #RuntimeMaxFileSize= #MaxRetentionSec= From 31c7cace0dc29fca5a427d53ab9a3500226f26c1 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Mon, 24 Apr 2017 19:34:47 +0000 Subject: [PATCH 2/3] Fix logrotate bugs --- files/image_config/cron.d/logrotate | 2 +- files/image_config/logrotate.d/rsyslog | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/files/image_config/cron.d/logrotate b/files/image_config/cron.d/logrotate index e7813aa1f57b..877e0cb6d5d7 100644 --- a/files/image_config/cron.d/logrotate +++ b/files/image_config/cron.d/logrotate @@ -1,3 +1,3 @@ # Attempt to rotate system logs once per minute -* * * * * root /usr/sbin/logrotate -f /etc/logrotate.d/rsyslog +* * * * * root /usr/sbin/logrotate /etc/logrotate.d/rsyslog diff --git a/files/image_config/logrotate.d/rsyslog b/files/image_config/logrotate.d/rsyslog index c09604187f7f..f3dbe6db4224 100644 --- a/files/image_config/logrotate.d/rsyslog +++ b/files/image_config/logrotate.d/rsyslog @@ -3,16 +3,14 @@ /var/log/teamd.log { rotate 7 -# Removed 'daily' interval, as we now call logrotate more frequently via cron -# and we want to check these logs every time -# daily - size 100M + daily + maxsize 100M missingok notifempty compress delaycompress postrotate - invoke-rc.d rsyslog rotate > /dev/null + kill -HUP $(cat /var/run/rsyslogd.pid) endscript } /var/log/mail.info @@ -30,14 +28,14 @@ { rotate 4 weekly - size 100M + maxsize 100M missingok notifempty compress delaycompress sharedscripts postrotate - invoke-rc.d rsyslog rotate > /dev/null + kill -HUP $(cat /var/run/rsyslogd.pid) endscript } From ce27b29f97d1c3ba6f0ca76d9bed67b2a22d0fd1 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Tue, 25 Apr 2017 00:52:31 +0000 Subject: [PATCH 3/3] Add comment regarding init-system-helpers bug --- files/image_config/logrotate.d/rsyslog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/files/image_config/logrotate.d/rsyslog b/files/image_config/logrotate.d/rsyslog index f3dbe6db4224..0d03e906c9b8 100644 --- a/files/image_config/logrotate.d/rsyslog +++ b/files/image_config/logrotate.d/rsyslog @@ -10,6 +10,10 @@ compress delaycompress postrotate + # Calling kill directly instead of 'service rsyslog rotate >/dev/null' due + # to bug in init-system-helpers. Bug has apparently been fixed in v1.47. + # However, Debian Jessie is still using v1.22. + # See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=672218 kill -HUP $(cat /var/run/rsyslogd.pid) endscript } @@ -35,6 +39,10 @@ delaycompress sharedscripts postrotate + # Calling kill directly instead of 'service rsyslog rotate >/dev/null' due + # to bug in init-system-helpers. Bug has apparently been fixed in v1.47. + # However, Debian Jessie is still using v1.22. + # See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=672218 kill -HUP $(cat /var/run/rsyslogd.pid) endscript }