:: Re: [DNG] Log rotation keeps rotate…
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Lorenz
Fecha:  
A: dng@d404.nl
Cc: dng
Asunto: Re: [DNG] Log rotation keeps rotated file open
Hi all,

I'm not sure how to fix this issue properly in runit-services package; latest
version of runit forward non standard actions to the sysv scripts but it
still doesn't work for rsyslogd.

Maybe the run script could configure rsyslogd to output to stdout and
catch the output with svlogd, so that there is no need to rely on logrotate.
However the log directory will change from /var/log/ to /var/log/syslog.runit
or something like that and it will be a surprise for users..
Also, I may have to edit the syslog.conf on the fly (and restore it in
the finish file)
or change to another "runit.syslog.conf" file and that makes two surprises.
Thoughts?

Cheers,
Lorenzo

Il giorno mar 21 mag 2024 alle ore 22:21 dng@??? <dng@???> ha scritto:
>
> On 21-05-2024 18:15, kc-devuan@??? wrote:
>
> 21 May 2024 16:39:13 Dan Purgert via Dng <dng@???>:
>
> Check the configuration, as I recall those should have a postrotate
> script (/usr/lib/rsyslog/rsyslog-rotate) running to restart syslog.
>
> Config is /etc/logrotate.d/rsyslog here (pulled forward from Chimaera).
>
> The postrotate config and script are present with the script running
> invoke-rc.d rsyslog rotate > /dev/null
>
> I am running runit. restarting rsyslog seemed to fix it. If it happens again then I will take a closer look.
>
> Thanks
> _______________________________________________
> Dng mailing list
> Dng@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
>
>
> I noticed something similar by running a docker container with runit (do not ask why).
>
> The default /etc/logrotate.d/rsyslog calls /usr/lib/rsyslog/rsyslog-rotate which in turn checks for
>
> if [ -d /run/systemd/system ]; then
>     systemctl kill -s HUP rsyslog.service
> else
>     invoke-rc.d rsyslog rotate > /dev/null
> fi

>
> but does not restart rsyslog as it should. Most likely a problem with the PATH to /usr/sbin/ where both binaries reside if present.
>
> I took a shortcut and replaced in /etc/logrotate.d/rsyslog
>
> /usr/lib/rsyslog/rsyslog-rotate with /usr/sbin/service rsyslog rotate
>
>
> Grtz.
>
> Nick
>
> _______________________________________________
> Dng mailing list
> Dng@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng