[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[RFC] How should rsyslog handle .0 logfiles from sysklogd


as rsyslog will be our default syslogd for lenny, I'd like to fix bug
#491672 [1], I'm just undecided about which solution is best.

rsyslog, in contrast to sysklogd, uses logrotate to rotate the default
log files. Unfortunately sysklogd uses a custom log rotate mechanism,
which starts the log rotate cycle at .0
The default logrotate configuration starts the log rotate cyle at .1.

This leaves .0 files around when you switch from sysklogd to rsyslog [2]
which will never be rotated.

Afaics I have the following options.
1.) Do nothing and simply document this fact in README.Debian, telling
the admin that he can safely delete this files if he no longer needs them.

2.) Try to log rotate the .0 files for the default Debian log files in
postinst. I feel a bit uneasy about this approach, for several reasons:
- It adds fairly reasonable complexity to the maintainer scripts, if you
 want to consider all corner cases.
E.g. if you switch from syslog-ng to rsyslog, it is very likely that you
have old .0 files lying around (from a sysklogd->syslog-ng switch), so
syslog.1 would be older than syslog.2 which would be very confusing.

3.) Delete the .0 files in postinst. Is this covered by the policy?

4.) Use start 0 in /etc/logrotate.d/rsyslog, which would retain old
sysklogd behaviour. This would mean, that it would still be incompatible
with all other syslog alternatives [2] besides old sysklogd. That's why
I'd keep the logrotate standard configuration.

I'm leaning towards 1.) or 3.), although the latter would mean deleting
a log file and I'm not sure everyone would be happy about that (on the
other hand 2.) would simply mean I have to delete .6.gz/3.gz instead of .0)

Is there anything else to consider, did I miss another option?

I'd be very thankful for your comments and feedback.


[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=491672
[2] Or to any other syslog alternative, like syslog-ng, dsyslog or
inetutils-syklogd, as they also use the standard logrotate configuration.
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature

Reply to: