From 636efa2da3a50e371b8a632a1d2ac43f85f04bfa Mon Sep 17 00:00:00 2001 From: Remi Bergsma Date: Sun, 13 Dec 2015 11:53:45 +0100 Subject: [PATCH] CLOUDSTACK-9155 make sure logrotate is effective Many processes on the VRs log to cloud.log. When logrotate kicks in, the file is rotated but the scripts still write to the old inode (cloud.log.1 after rotate). Tis quickly fills up the tiny log partition. Using 'copytruncate' is a tradeoff, there is a slight change of missing a log entry, but in the old situation we were missing all of them after logrotate. --- systemvm/patches/debian/config/etc/logrotate.d/cloud | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/systemvm/patches/debian/config/etc/logrotate.d/cloud b/systemvm/patches/debian/config/etc/logrotate.d/cloud index 82801f1c924..b3a6a6d851e 100644 --- a/systemvm/patches/debian/config/etc/logrotate.d/cloud +++ b/systemvm/patches/debian/config/etc/logrotate.d/cloud @@ -22,4 +22,8 @@ notifempty compress delaycompress + # CLOUDSTACK-9155: We cannot tell the processes that are writing to this + # file to use the new inode, so instead we copy the original file, truncate + # it and keep the same inode. + copytruncate }