Ticket #1313 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

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:1 follow-up: ↓ 2 Changed 12 years ago by 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.

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.

delaycompress sounds like a good plan, and the dumb idea of cat /var/log/athena-update
cat /var/log/athena-update.1 seems reasonable enough.

comment:3 Changed 12 years ago by jdreed

  • Status changed from new to committed
  • Fixed in version set to debathena-auto-update 1.42.2

comment:4 Changed 12 years ago by jdreed

  • Status changed from committed to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.