From 2ae45333102e7627c07a12092806badc59dd09f9 Mon Sep 17 00:00:00 2001 From: Wido den Hollander Date: Fri, 13 Sep 2019 17:11:24 +0200 Subject: [PATCH] kvm: Logrotate should not touch agent.log Logrotate should only touch security_group.log and resizevolume.log as the agent.log is already rotated by log4j inside the Agent. Having two systems trying to rotate agent.log leads to all kinds of issues like having binary (compressed) data in the middle of a plain-text log file. In addition we do not have to rotate the logs every day, only when they grow larger than 10M. On fairly idle hypervisors this should not cause those logs to rotate every day. Signed-off-by: Wido den Hollander --- agent/conf/cloudstack-agent.logrotate.in | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/agent/conf/cloudstack-agent.logrotate.in b/agent/conf/cloudstack-agent.logrotate.in index 6733af52cd8a..d9a3dfbc5697 100644 --- a/agent/conf/cloudstack-agent.logrotate.in +++ b/agent/conf/cloudstack-agent.logrotate.in @@ -15,12 +15,11 @@ # specific language governing permissions and limitations # under the License. -@AGENTLOG@ -/var/log/cloudstack/agent/security_group.log -{ +/var/log/cloudstack/agent/security_group.log /var/log/cloudstack/agent/resizevolume.log { copytruncate daily rotate 5 compress missingok + size 10M }