#644522 c-icap: Missing logrotate script

Package:
c-icap
Source:
c-icap
Description:
ICAP server implementation
Submitter:
Vladislav Kurz
Date:
2015-05-14 17:09:05 UTC
Severity:
minor
#644522#5
Date:
2011-10-06 14:42:17 UTC
From:
To:
Hello,

I noticed that logs in /var/log/c-icap do not get rotated. So i prepared logrotate script.
Well it is based on logrotate script from squid. here it is:

#
#       Logrotate fragment for c-icap.
#
/var/log/c-icap/*.log {
        daily
        compress
        delaycompress
        rotate 2
        missingok
        nocreate
        sharedscripts
        postrotate
                test ! -e /var/run/c-icap/c-icap.pid || echo -n "reconfigure" > /var/run/c-icap/c-icap.ctl
        endscript
}

Please include it in the package.

Regards
Vladislav Kurz

#644522#10
Date:
2013-01-23 09:33:11 UTC
From:
To:
I have to extend mu own bug report. My logrotate script seems to fail.
Log is rotated once, but the reconfigure request is with this error in
server.log:

Wed Jan 23 10:18:43 2013, general, A reconfigure pending. Ignoring
reconfigure request.....

And c-icap continues to log in the rotated log file which then grows
indefinitely.

Restarting c-icap is not a good solution either. It happened to me,
that the restart failed, I had to kill -9 c-icap and start it again,
and in the meantime squid stopped working as well because of lost
communication with c-icap.

So it seems that there is something wrong with handling reconfigure
requests and restarts.

#644522#15
Date:
2015-05-14 16:56:11 UTC
From:
To:
Hi,

I noticed since this bug was reported, logrotate script is still
missing. One of my customers claims me a c-icap log file of ~ 18G !!

So here is the logrotate file I used for him:

/var/log/c-icap/*.log {
         daily
         missingok
         notifempty
         size 1M
         rotate 30
         compress
         delaycompress
	create 644 c-icap nogroup
         copytruncate
         maxage 30
}

Maybe some tuning is needed, but it works.

Inspired from this french documentation:

http://medias.coutances.educagri.fr/proc%C3%A9dures/Administrateur/Anti-virus_proxy.pdf

Thx,