Bug 50417 - logrotate file for Squid package is bogus
Summary: logrotate file for Squid package is bogus
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: squid   
(Show other bugs)
Version: 7.1
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2001-07-31 01:49 UTC by Florin Andrei
Modified: 2014-03-17 02:22 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-07-31 01:49:37 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Florin Andrei 2001-07-31 01:49:32 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.19 i686; en-US; rv:0.9.1)

Description of problem:
The typical logrotate file for the Squid package tries to rotate
individually all the Squid's log files: (/var/log/squid/)access.log,
cache.log, store.log.
At the end, it will send a signal to Squid (squid -k rotate) telling it...
to rotate its own logs! :-)
That's wrong. The logs should not be rotated twice (once by logrotate, once
by Squid), but just once is enough.

How reproducible:

Steps to Reproduce:
1.Install Squid
2.Run it for a while
3.Watch the Squid logs

Actual Results:  The logs are rotated twice.

Expected Results:  The logs should be rotated once.

Additional info:

I suggest replacing /etc/logrotate.d/squid with this file:

/var/log/squid/bogus_file {
# This script asks squid to rotate its logs on its own.
# Restarting squid is a long process and it is not worth
# doing it just to rotate logs
      /usr/sbin/squid -k rotate

This way, Squid will take care of its own log files, as it is supposed to
do. Moreover, if one modifies squid.conf and alters the log files
structure, with my solution there is no need to also modify the Squid
logrotate file ;-) because Squid will take care of everything.

I suggest to use this method for every daemon that is capable of rotating
its own logs.

Comment 1 Bill Nottingham 2001-07-31 02:18:52 UTC
You're misunderstanding how it's set up. squid is set up with 'logfile_rotate 0'
in /etc/squid/squid.conf; hence, when it you call 'squid -k rotate', it's
just telling it to re-open the logs.

I suppose I should change the commentary to reflect this better.

Note You need to log in before you can comment on or make changes to this bug.