On 03/07/2019 08.03, Peter Krempa wrote:
I'm not sure that this is the right thing to do. virtlogd has
some
internal log rotation mechanisms
logrotate is already in use here and this patch doesn't change what is
rotated nor how often it is rotated.
and also the SIGUSR1 action is reserved
for re-exec updates and not for dealing with modified files
The mechanism (re-exec) and implementation details for both uses do not
conflict.
Additionally the internals are supposed to keep all the FD's open
during
re-exec so I'm not even sure that this will help.
This test shows that it helps:
# ls -la /var/log/libvirt/qemu/foo.log
-rw------- 1 root root 0 Jun 30 00:00 /var/log/libvirt/qemu/foo.log
# mv /var/log/libvirt/qemu/foo.log /var/log/libvirt/qemu/foo.log.0
# /usr/bin/killall -USR1 virtlogd
# ls -la /var/log/libvirt/qemu/foo.log
-rw------- 1 root root 0 Jul 3 08:06 /var/log/libvirt/qemu/foo.log
--
Best regards,
Jan Zerebecki