Clean up memcached supervisor logrotate

Bug #1471863 reported by Paul Everitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KARL4
Won't Fix
Low
Paul Everitt

Bug Description

From discussion with gocept:

No, KARL does not get restarted. SIGUSR2 does the following for supervisord. From http://supervisord.org/running.html#signal-handlers:

"...supervisord will close and reopen the main activity log and all child log files...."

I don’t think I need a postrotate to kill my supervisord (and thus memcached) during log rotation. I plan to install:

/srv/osfkarl/memcachedconfs/var/log/*.log {
daily
missingok
rotate 10
compress
delaycompress
notifempty
copytruncate
}

I think SIGUSR2 is a good idea in this case, too. At least I would test if your memcached the really gets killed when its parent (supervisord) gets a SIGUSR2. I suspect that this will work, just like it does for the KARL application. You can trigger the rotation by executing "user-logrotate -v" as the osfkarl/karlstaging service user (forcing the rotation works by adding -f to the command). A PID comparision (before-after) should help finding out whether memcached is retarted or not.

Apart from that, the snippets you define in /var/spool/logrotate/<service-user> also have underlying default options (see /etc/logrotate.options) which you do not need to redefine in your script.

tags: added: r4.10
tags: removed: r4.10
Changed in karl4:
milestone: 009 → 010
Revision history for this message
Paul Everitt (paul-agendaless) wrote :

This is actually working well enough.

Changed in karl4:
status: New → Won't Fix
Changed in karl4:
milestone: 010 → 999
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.