I believe the rotate=0 is what zeroed the files. You might change the 0 to something else
(like 4).
I have 2.0.5 installed from fedora (sorta) and the task section of the logrotate config is
also
configured to zero files weekly.
dale
On 9/16/2010 10:41 AM, mark wrote:
Hello,
I'm working on setting up Cobbler 2.0.3. This morning the logrotate
process on my Cobbler server zeroed all of the log files under
/var/log/cobbler/tasks:
-rw-rw-rw- 1 apache root 0 Sep 16 04:02 2010-08-09_163741_sync.log
-rw-rw-rw- 1 apache root 0 Sep 16 04:02 2010-08-09_163758_power.log
-rw-rw-rw- 1 apache root 0 Sep 16 04:02 2010-08-12_125948_get_loaders.log
-rw-rw-rw- 1 apache root 0 Sep 16 04:02 2010-08-25_145355_get_loaders.log
-rw-rw-rw- 1 apache root 0 Sep 16 04:02 2010-08-25_153747_get_loaders.log
-rw-rw-rw- 1 apache root 0 Sep 16 04:02 2010-08-25_155930_get_loaders.log
-rw-rw-rw- 1 apache root 0 Sep 16 04:02 2010-08-26_133302_buildiso.log
-rw-rw-rw- 1 apache root 0 Sep 16 04:02 2010-08-26_133337_sync.log
-rw-rw-rw- 1 apache root 0 Sep 16 04:02 2010-09-07_154201_power.log
-rw-rw-rw- 1 apache root 0 Sep 16 04:02 2010-09-07_171747_power.log
This was both surprising and disappointing, and I'm hoping it's a
misconfiguration that has since been corrected. The
/etc/logrotate.d/cobblerd_rotate section for the tasks subdir looks
like this:
/var/log/cobbler/tasks/*.log {
weekly
size=0M
rotate=0
sharedscripts
postrotate
find /var/log/cobbler/tasks -name "*log" -mtime +10 -exec
/bin/rm -f {} \;
endscript
}
And my cobbler version is this:
# cobbler --version
Cobbler 2.0.3.1
source: ?, ?
build time: Mon Mar 1 20:08:11 2010
Does anyone running a later version have a different config for
logrotate for the tasks directory? Or should I upgrade to 2.0.5 for
this and/or other fixes?
Thanks,
mark
_______________________________________________
cobbler mailing list
cobbler(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler