Bug 85213 - logrotate postrotate script not working when "cache_store_log none"
logrotate postrotate script not working when "cache_store_log none"
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: squid (Show other bugs)
8.0
All Linux
medium Severity high
: ---
: ---
Assigned To: Martin Stransky
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-02-26 13:37 EST by Tomasz Ostrowski
Modified: 2007-04-18 12:51 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-07-04 06:30:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tomasz Ostrowski 2003-02-26 13:37:48 EST
Description of problem:
When
    cache_store_log none
is given in squid configuration file (store log is usually not needed)
postrotate script from /etc/logrotate.d/squid is not started but access.log and
cache.log are rotated and compressed. It means that the original files are
deleted but because squid process will not close and reopen its logs they will
be written to deleted file descriptor and lost.

/etc/logrotate.d/squid should be like this:
/var/log/squid/access.log /var/log/squid/cache.log /var/log/squid/store.log {
    weekly
    rotate 5
    copytruncate
    compress
    notifempty
    missingok
    sharedscripts
    postrotate
      /usr/sbin/squid -k rotate
    endscript
}

with all logs in one section and sharedscripts option.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Set "cache_store_log none" in squid configuration file
2. Wait for logrotate to rotate not empty access.log and cache.log and not
rotate empty store.log



Actual Results:  access.log and cache.log are empty after some time of using squid

Expected Results:  access.log and cache.log are reopened by squid and all logs
from now on are written there

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