Ticket #1313 (closed defect: fixed)
Logrotate, auto-update and athinfo don't play nice
Reported by: | jdreed | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | The Distant Future |
Component: | -- | Keywords: | |
Cc: | Fixed in version: | debathena-auto-update 1.42.2 | |
Upstream bug: |
Description
If a machine has not been booted for a while, auto-update will run at boot, which will be fine, until logrotate realizes it's been forever and rotates the log. Thus auto-update is logging to athena-update.log.1.gz, and "athinfo <host> update.log" results in an empty query. I don't really have a good answer beyond [ -s /var/log/athena-update ] && cat /var/log/athena-update || zcat /var/log/athena-update.1.gz.
Change History
comment:2 in reply to: ↑ 1 Changed 12 years ago by kaduk
Replying to jweiss:
I believe that the update will actually be logging to an unlinked file that is the former version of /var/log/athena-update, and /var/log/athena-update.1.gz will only contain the update logs up until the point where logrotate rotated the file. You could probably improve the nsituation by telling logrotate not to compress the .1 version of the log using the "delaycompress" keyword.
I was going to mention the unlinked file bit, but things piled up. Thanks.
cat /var/log/athena-update.1 seems reasonable enough. |
I believe that the update will actually be logging to an unlinked file that is the former version of /var/log/athena-update, and /var/log/athena-update.1.gz will only contain the update logs up until the point where logrotate rotated the file. You could probably improve the nsituation by telling logrotate not to compress the .1 version of the log using the "delaycompress" keyword.