You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These are only the last 5 lines, look at the attachment to see the full mess: ls-ltra-var-log-mlc.txt
I think the root cause is this line, i.e. /var/log/mlc/* matches ALL files including the already rotated ones. From the manpage:
Please use wildcards with caution. If you specify *, logro‐
tate will rotate all files, including previously rotated ones.
A way around this is to use the olddir directive or a more ex‐
act wildcard (such as *.log).
The behaviour can be verified by executing logrotate -d /etc/logrotate.d/mlc-ansible-pull as root.
Q: Do we ever expect a different logfile than ansible.log in /var/log/mlc (or /var/log/potos in the generic case) and if yes, is it fair to configure logrotating only for files ending in *log?.
You are totally right. If I remember correctly, there can be other files besides ansible.log such as setup.log. So I prefer having the generic fix with *.log. -> See #73
Description of the bug
Looking at my
/var/log/mlc/
directory, I see horrible things 😱These are only the last 5 lines, look at the attachment to see the full mess: ls-ltra-var-log-mlc.txt
I think the root cause is this line, i.e.
/var/log/mlc/*
matches ALL files including the already rotated ones. From the manpage:The behaviour can be verified by executing
logrotate -d /etc/logrotate.d/mlc-ansible-pull
as root.Q: Do we ever expect a different logfile than
ansible.log
in/var/log/mlc
(or/var/log/potos
in the generic case) and if yes, is it fair to configure logrotating only for files ending in*log
?.If yes, the old line
could simply be replaced by
And all would be good. Agree @fadnincx ?
Steps To Reproduce
See above.
Additional Information
See above.
The text was updated successfully, but these errors were encountered: