[sheepdog-users] logrotate

Valerio Pachera sirio81 at gmail.com
Mon Nov 3 12:19:17 CET 2014

2014-11-02 3:15 GMT+01:00 YunQiang Su <wzssyqa at gmail.com>:
> Are this right?
> 1. send HUP to the main process is a good idea - no matter by
> logrotate configure file or by init script

> 2. if use copytruncate of logrotate: Note that there is a very small
> time slice between
>     copying the file and truncating it, so some logging data might be lost.

As of now, use 'copytruncate' because sheepdog is going to handle HUP
it's own way.
The risk of loosing a bit of the log during the rotation I think is irrelevant.

I sent a patch to remove sheepdog log rotation but it will affect
0.9.1 and not 0.9.0.

>     The problem is that how to determine which one is the main progress?
>     Is there a way to do it?

The easy way is to start sheep with '--pidfile /var/run/sheep.pid' and
I recommend that.

By the way, from my tests this works as well
  kill -HUP $(/usr/bin/pgrep -x sheep | head -1)

for 0.9.0, use copytruncate
for 0.9.1, if my patch is correct, better use kill -HUP $(cat

please add --pidfile option alreay in 0.9.0 package.

Thank you.

More information about the sheepdog-users mailing list