Merge ~cyphermox/maas:master into maas:master

Proposed by Mathieu Trudel-Lapierre
Status: Merged
Approved by: Adam Collard
Approved revision: 3b99673dbbf44e3c1b461fa68a258c912afceabd
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~cyphermox/maas:master
Merge into: maas:master
Diff against target: 8 lines (+1/-1)
1 file modified
debian/extras/maas_remote_syslog_compress (+1/-1)
Reviewer Review Type Date Requested Status
Adam Collard (community) Approve
MAAS Lander Approve
Review via email: mp+399859@code.launchpad.net

Commit message

Silence bzip2 when files are already compressed (LP: #1920019)

Cron runs every day to compress old log files; we shouldn't try to
compress files that are already .bz2; since they are already
compressed. Unfortunately, since there may be lot such files over
time, cron will keep writing email messages to /var/spool/mail with
these logs, potentially amounting to a lot of disk space wasted.

Description of the change

Explicitly ignore .bz2 files.

To post a comment you must log in.
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b master lp:~cyphermox/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: SUCCESS
COMMIT: 3b99673dbbf44e3c1b461fa68a258c912afceabd

review: Approve
Revision history for this message
Adam Collard (adam-collard) :
review: Approve
Revision history for this message
Adam Collard (adam-collard) wrote :

Thanks for the MP

Revision history for this message
MAAS Lander (maas-lander) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/extras/maas_remote_syslog_compress b/debian/extras/maas_remote_syslog_compress
2index b50e501..b3e43ea 100644
3--- a/debian/extras/maas_remote_syslog_compress
4+++ b/debian/extras/maas_remote_syslog_compress
5@@ -1,2 +1,2 @@
6 # Compress log files not changed in more than 48 hours:
7-30 4 * * * root find /var/log/maas/rsyslog -type f -mtime +2 -exec bzip2 '{}' \;
8+30 4 * * * root find /var/log/maas/rsyslog -type f -not -name '*.bz2' -mtime +2 -exec bzip2 '{}' \;

Subscribers

People subscribed via source and target branches