[BlueOnyx:18700] Problem with aventurin{e} logrotate
Simone Capra
capra at erweb.it
Thu Nov 26 04:05:42 -05 2015
Hi all,
i have noticed that Aventurin{e} maillog is not rotating correctly. I
have setup logrotate to perform a daily rotation on all logs via the
"daily" keyword in /etc/logrotate.conf
The file /etc/logrotate.d/syslog has no reference to time keywords.
After a few days logs are rotated always on a weekly basis. I have run
the command
/usr/sbin/logrotate /etc/logrotate.conf -d
and at a point i noticed:
rotating pattern: /var/log/cron
/var/log/maillog
/var/log/messages
/var/log/secure
/var/log/spooler
weekly (52 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/cron
log does not need rotating
considering log /var/log/maillog
log does not need rotating
considering log /var/log/messages
log does not need rotating
considering log /var/log/secure
log does not need rotating
considering log /var/log/spooler
log does not need rotating
not running postrotate script, since no logs were rotated
It seems that logrotate thinks of a weekly rotation.... but it must be
daily as per my configuration on /etc/logrotate.conf
The problem seems to be /etc/logrotate.d/glusterfs which contains time
keywords outside of configuration files.
I have modified the file in this way:
# Rotate client logs
/var/log/glusterfs/*.log {
weekly
rotate 52
missingok
compress
delaycompress
notifempty
sharedscripts
postrotate
/usr/bin/killall -HUP glusterfs > /dev/null 2>&1 || true
/usr/bin/killall -HUP glusterd > /dev/null 2>&1 || true
endscript
}
# Rotate server logs
/var/log/glusterfs/bricks/*.log {
weekly
rotate 52
missingok
compress
delaycompress
notifempty
sharedscripts
postrotate
sharedscripts
postrotate
/usr/bin/killall -HUP glusterfsd > /dev/null 2>&1 || true
endscript
}
and now it seems to be ok: logs are rotate correctly!
Regards
Simone
More information about the Blueonyx
mailing list