[NEW PATCH] BZ#728874 - vdsm-logrotate shouldn't prints invalid error message (via gerrit-bot)

Igor Lvovsky ilvovsky at redhat.com
Tue Aug 16 11:18:48 UTC 2011


New patch submitted by Igor Lvovsky (ilvovsky at redhat.com)

You can review this change at: http://gerrit.usersys.redhat.com/815

commit 88468cbf87c6206492e6588aecc8ea3b90b624bc
Author: Igor Lvovsky <ilvovsky at redhat.com>
Date:   Tue Aug 16 14:18:36 2011 +0300

    BZ#728874 - vdsm-logrotate shouldn't prints invalid error message
    
    Change-Id: Id5857474a76acaa7431345f37147328a9a21e58a

diff --git a/vdsm/vdsm-logrotate b/vdsm/vdsm-logrotate
index a641f36..3a5f8de 100755
--- a/vdsm/vdsm-logrotate
+++ b/vdsm/vdsm-logrotate
@@ -7,4 +7,10 @@ if [ $EXITVALUE != 0 ]; then
     /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
 fi
 
+/usr/bin/find /var/log/core -type f -name '*xz' -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]"
+fi
+
 exit $EXITVALUE
diff --git a/vdsm/vdsm-logrotate.conf b/vdsm/vdsm-logrotate.conf
index 64bef03..10f4a2b 100644
--- a/vdsm/vdsm-logrotate.conf
+++ b/vdsm/vdsm-logrotate.conf
@@ -1,5 +1,5 @@
 /var/log/vdsm/*.log {
-    rotate 100 
+    rotate 100
     missingok
     copytruncate
     size 15M
@@ -17,6 +17,3 @@
     uncompresscmd /usr/bin/unxz
     compressext .xz
 }
-/var/log/core/*.dump.xz {
-    maxage 7
-}




More information about the vdsm-patches mailing list