Bug 68917
| Summary: | bad logrotate configuration for mailman | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | ferulisses |
| Component: | logrotate | Assignee: | Elliot Lee <sopwith> |
| Status: | CLOSED RAWHIDE | QA Contact: | Aaron Brown <abrown> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.2 | CC: | adoline, bernd.bartmann, herrold |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | i386 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2002-12-10 18:07:00 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
This also happens without log file compression. Yea, sorry, there's really no good way to protect against a bad wildcard. The administrator is responsible for deciding what files they want to rotate and knowing how to specify those files. No, you as Red Hat are responsible for providing proper and working defaults. A simple solution was posted by the original bug reporter. Why don't you just use this a the default for /etc/logrotate.d/mailman? Ahh, you are correct sir; I did not realize that this was the default config. I went and checked the mailman-2.0.13-2 logrotate setup in rawhide and it does not use the wildcard, so hopefully that eliminates the issue for the future. Fine. Any chance on getting an official errata for RH 7.2 / 7.3? Quick and dirty fix -- add this to crontab pending a fix, and in any backport release: rm /var/log/mailman/*z.[0-9]*.gz The question of a backport release could safely incorporate it, to cure damage inadvertently caused. actually, using wildcards is 'supported' in an example in 'man logrotate':
/var/log/news/* {
monthly
etc. so fix for logrotate should be provided or docs updated
*** Bug 77619 has been marked as a duplicate of this bug. *** *** Bug 75364 has been marked as a duplicate of this bug. *** man page fixed, 3.6.6 should have the change. The news example in the old man page for logrotate was not an error. The full
example for the news logs read as follows in logrotate-3.6.4-1:
/var/log/news/* {
monthly
rotate 2
olddir /var/log/news/old
missingok
postrotate
kill -HUP `cat /var/run/inn.pid`
endscript
nocompress
}
This was fine, because of the use of the 'olddir' option. There is a paragraph
explaining this further down in the man page:
Please use wildcards with caution. If you specify *,
logrotate will rotate all files, including previously
rotated ones. A way around this is to use the olddir
directive or a more exact wildcard (such as *.log).
The new man page for logrotate from rawhide now has the example as:
/var/log/news/news.crit {
monthly
rotate 2
olddir /var/log/news/old
missingok
postrotate
kill -HUP `cat /var/run/inn.pid`
endscript
nocompress
}
This does not quite jive with the paragraph explaining this example:
The last section defines the parameters for all of the
files in /var/log/news. Each file is rotated on a monthly
basis. This is considered a single rotation directive and
if errors occur for more then one file, the log files are
not compressed.
The paragraph states that *all* of the files in /var/log/news are rotated, when
the example actually only rotates the file 'news.crit'. On my 7.3 distribution,
I see news.err and news.notice in the directory as well.
The mailman packages logrotate config file was in error, but the logrotate man
page was fine. Perhaps consider changing the logrotate man page back to the way
it read previously, since I believe the example was intended to show the proper
way of using a '*' wildcard.
|
Description of problem: The default configuration of mailman causes loop on logrotate, fill the /var/log/mailman directory of compressed files Version-Release number of selected component (if applicable): mailman-2.0.11-1 logrotate-3.5.9-1 How reproducible: Always Steps to Reproduce: 1. install mailman 2. enable compression on /etc/logrotate.conf (not sure if this is necessary) 3. wait logrotate run thwo times 4. ls /var/log/mailman Actual Results: the file instaled in /etc/logrotate.d/mailman is: --------------------------- /var/log/mailman/* { missingok } --------------------------- with this configuration the logrotate program don't work well, it doesn't recognize the old compressed files, and create backup of them, creating a lot of backup of backup of backup, filling the directory and the disk, like this: $ cd /var/log/mailman $ ls post.1.gz post.1.gz.1.gz post.1.gz.1.gz.1.gz post.1.gz.1.gz.1.gz.1.gz post.1.gz.1.gz.1.gz.1.gz.1.gz post.1.gz.1.gz.1.gz.1.gz.1.gz.1.gz post.1.gz.1.gz.1.gz.1.gz.1.gz.1.gz.1.gz post.1.gz.1.gz.1.gz.1.gz.1.gz.1.gz.1.gz.1.gz post.1.gz.1.gz.1.gz.1.gz.1.gz.1.gz.1.gz.1.gz.1.gz post.1.gz.1.gz.1.gz.1.gz.1.gz.1.gz.1.gz.2.gz Expected Results: just rotate the logs, may use a config file like this: --------------------------- /var/log/mailman/bounce /var/log/mailman/digest /var/log/mailman/error/var/log/m ailman/post /var/log/mailman/qrunner /var/log/mailman/smtp /var/log/mailman/subscribe /var/log/mailman/vette { missingok } --------------------------- Additional info: may be considered a logrotate bug, but just the mailman package have a configuration file that "exploit" the bug. I think that is more easy fix the configuration file now and schedule to fix the logrotate in the future.