From fc80e758ccc28070ef504e379213731a62653aa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Obih=C3=B6rnchen?= Date: Fri, 23 Feb 2024 02:32:44 +0100 Subject: [PATCH] Do not use copytruncate for xcat log rotation PR https://github.com/xcat2/xcat-core/pull/6510 tried to fix missing logs for goconserver, but also added copytruncate to all xcat logs in /var/log/xcat*.log. This is not needed because these logs are written by rsyslog and xcat itself, not goconserver. The main rsyslog developer does not recommend to use copytruncate for rsyslog: https://serverfault.com/a/901366 For HA setups with logs on NFS etc. copytruncate can be very slow. --- xCAT/etc/logrotate.d/xcat | 1 - 1 file changed, 1 deletion(-) diff --git a/xCAT/etc/logrotate.d/xcat b/xCAT/etc/logrotate.d/xcat index 407fb40241..de4f3d3448 100644 --- a/xCAT/etc/logrotate.d/xcat +++ b/xCAT/etc/logrotate.d/xcat @@ -1,7 +1,6 @@ /var/log/xcat/*.log { missingok sharedscripts - copytruncate delaycompress postrotate test -f /var/run/rsyslogd.pid && kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true