New patch submitted by Dan Kenigsberg (danken(a)redhat.com)
You can review this change at:
http://gerrit.usersys.redhat.com/632
commit f7d79ce0791e8cb8281b0d5974c2667ce2b38c49
Author: Federico Simoncelli <fsimonce(a)redhat.com>
Date: Tue Jun 28 14:12:04 2011 +0000
BZ#716962 logrotate: compress logs using the xz format
Change-Id: I736c5e625e4d4fba8d5d7d220ee86df9f01cd7fb
diff --git a/vdsm/vdsm-logrotate b/vdsm/vdsm-logrotate
index 4c84d7e..efa9e09 100755
--- a/vdsm/vdsm-logrotate
+++ b/vdsm/vdsm-logrotate
@@ -7,7 +7,6 @@ if [ $EXITVALUE != 0 ]; then
/usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
fi
-/usr/bin/find /var/log/core -type f -name '*gz' -mtime +7 -exec /bin/rm -f
'{}' \;
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
/usr/bin/logger -t logrotate "ALERT clean old core files exited abnormally with
[$EXITVALUE]"
diff --git a/vdsm/vdsm-logrotate.conf b/vdsm/vdsm-logrotate.conf
index 2962ce3..12e16ad 100644
--- a/vdsm/vdsm-logrotate.conf
+++ b/vdsm/vdsm-logrotate.conf
@@ -4,12 +4,21 @@
copytruncate
size 15M
compress
+ compresscmd /usr/bin/xz
+ uncompresscmd /usr/bin/unxz
+ compressext .xz
}
/var/log/core/*.dump {
rotate 1
missingok
size 0
compress
+ compresscmd /usr/bin/xz
+ uncompresscmd /usr/bin/unxz
+ compressext .xz
+}
+/var/log/core/*.dump.xz {
+ maxage 7
}
/var/log/libvirtd*.log {
rotate 100
@@ -17,4 +26,7 @@
copytruncate
size 15M
compress
+ compresscmd /usr/bin/xz
+ uncompresscmd /usr/bin/unxz
+ compressext .xz
}