Hi everyone,

Three thoughts come to mind, reading this. Two of them, terrible...

On Fri, Feb 14, 2025 at 05:40:28PM +0200, Dimitris T. wrote:

> something relative i noticed.
> 
> if i set /etc/logrotate.d/rsyslog -> rsyslog.disabled (so only one
> logrotation script for rsyslog ), then logrotate completes succesfully. 
> but...
> 
> when some runit-services trigger is run following some package upgrade (eg.
> rsyslog), then, aa-rsyslog-runit is also renamed to
> aa-rsyslog-runit.disabled.. (?!)  and there is no (rsys)log rotation!!
> 
> to reproduce :
> 
> ===
> 
> $ doas mv /etc/logrotate.d/rsyslog /etc/logrotate.d/rsyslog.disabled
> 
> $ ls -la /etc/logrotate.d :
> 
> -rw-r--r--   1 root root   260 Dec  26 13:53 aa-rsyslog-runit
> -rw-r--r--   1 root root   248 Feb  23  2023 rsyslog.disabled
> 
> $ doas apt install --reinstall rsyslog
> 
> ...
> 
> Processing triggers for runit (2.1.2-61) ...
> ok: run: rsyslog: (pid 31634) 0s
> Processing triggers for orphan-sysvinit-scripts (0.17) ...
> Processing triggers for runit-services (0.8.2) ...
> 
> $ ls -la /etc/logrotate.d :
> 
> -rw-r--r--   1 root root   260 Dec  26 13:53 aa-rsyslog-runit.disabled
> -rw-r--r--   1 root root   248 Feb  23  2023 rsyslog.disabled

(1) Ah, looking at d/runit-services.postinst, that looks fixable.
runit-services is trying to make sure that if it adds this file and
rsyslog's rotation is already disabled, then the new file should be
installed as disabled, too.

The logic in the postinst script could be changed so it only does this
if it just added the logrotate file, and not if it previously had.

The other two, whacky ideas I had were:

(2) Install an 'inotifywatch' on the log files being moved by logrotated
and then perform sv hup. Yeah... that's excessive!

(3) Regularly perform 'sv hup' on rsyslogd as it is harmless to do so;
make sure to schedule it when we guess logrotate is finished. Also, this
is a terrible idea!

> and if/when cooperation with rsyslog is restored (...?) then it could be
> easily reverted... (i think).

The irony of the level of rsyslog cooperation with non-systemd users, is
that as rsyslog usage drops off a cliff due to it no longer being
installed by default, we will become an ever greater proportion of its
users!

https://qa.debian.org/popcon.php?package=rsyslog

Reply via email to