2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-25 04:30:28 +00:00
Files
xcat-core/xCAT/etc/logrotate.d/xcat
Obihörnchen fc80e758cc 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.
2024-02-23 02:32:44 +01:00

11 lines
460 B
Plaintext

/var/log/xcat/*.log {
missingok
sharedscripts
delaycompress
postrotate
test -f /var/run/rsyslogd.pid && kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
test -f /var/run/syslogd.pid && kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
test -f /var/run/xcat/cmdlogservice.pid && kill -HUP `cat /var/run/xcat/cmdlogservice.pid 2> /dev/null` 2> /dev/null || true
endscript
}