Debian Bug report logs - #1031399
document log rotation on non-default inits

version graph

Package: rsyslog; Maintainer for rsyslog is Michael Biebl <[email protected]>; Source for rsyslog is src:rsyslog (PTS, buildd, popcon).

Reported by: Matthew Vernon <[email protected]>

Date: Thu, 16 Feb 2023 14:45:02 UTC

Severity: wishlist

Found in version rsyslog/8.2212.0-1

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Michael Biebl <[email protected]>:
Bug#1031399; Package rsyslog. (Thu, 16 Feb 2023 14:45:04 GMT) (full text, mbox, link).


Acknowledgement sent to Matthew Vernon <[email protected]>:
New Bug report received and forwarded. Copy sent to Michael Biebl <[email protected]>. (Thu, 16 Feb 2023 14:45:04 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Matthew Vernon <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: rsyslog: Log rotation broken on non-systemd systems
Date: Thu, 16 Feb 2023 14:41:08 +0000
Package: rsyslog
Version: 8.2212.0-1
Severity: serious

Hi,

When removing the systemv init scripts from rsyslog (which can be 
managed by orphan-sysvinit-scripts), the following was also removed from 
/usr/lib/rsyslog/rsyslog-rotate:

else
    invoke-rc.d rsyslog rotate > /dev/null

This means on non-systemd systems logrotate tries but fails to tell 
rsyslog to rotate its logs.

Could you restore this, please? It will have no impact on systemd 
systems (since the else clause will never match there), and otherwise 
log rotation with rsyslog cannot work properly on non-systemd systems, 
which is quite a serious isssue. And I can't do anything about this in 
orphan-sysvinit-scripts.

Thanks,

Matthew

-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-3-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

Versions of packages rsyslog depends on:
ii  libc6                      2.36-8
ii  libelogind0 [libsystemd0]  246.10-1debian1
ii  libestr0                   0.1.11-1
ii  libfastjson4               0.99.9-2
ii  liblognorm5                2.0.6-4
ii  libuuid1                   2.38.1-4
ii  libzstd1                   1.5.2+dfsg2-3
ii  zlib1g                     1:1.2.13.dfsg-1

Versions of packages rsyslog recommends:
ii  logrotate  3.21.0-1

Versions of packages rsyslog suggests:
pn  rsyslog-doc                       <none>
pn  rsyslog-gssapi                    <none>
pn  rsyslog-mongodb                   <none>
pn  rsyslog-mysql | rsyslog-pgsql     <none>
pn  rsyslog-openssl | rsyslog-gnutls  <none>
pn  rsyslog-relp                      <none>

-- Configuration Files:
/etc/rsyslog.conf changed [not included]

-- no debconf information



Information forwarded to [email protected]:
Bug#1031399; Package rsyslog. (Thu, 16 Feb 2023 20:45:06 GMT) (full text, mbox, link).


Acknowledgement sent to Michael Biebl <[email protected]>:
Extra info received and forwarded to list. (Thu, 16 Feb 2023 20:45:06 GMT) (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: Michael Biebl <[email protected]>
To: Matthew Vernon <[email protected]>, [email protected]
Subject: Re: Bug#1031399: rsyslog: Log rotation broken on non-systemd systems
Date: Thu, 16 Feb 2023 21:43:55 +0100
[Message part 1 (text/plain, inline)]
Control: severity -1 wishlist
Control: retitle -1 document log rotation on non-default inits

Am 16.02.23 um 15:41 schrieb Matthew Vernon:
> Package: rsyslog
> Version: 8.2212.0-1
> Severity: serious
> 
> Hi,
> 
> When removing the systemv init scripts from rsyslog (which can be
> managed by orphan-sysvinit-scripts), the following was also removed from
> /usr/lib/rsyslog/rsyslog-rotate:
> 
> else
>      invoke-rc.d rsyslog rotate > /dev/null
> 
> This means on non-systemd systems logrotate tries but fails to tell
> rsyslog to rotate its logs.
> 
> Could you restore this, please? 

I don't plan to re-add this (btw, this would break if 
orphan-sysvinit-scripts is not installed).

I'll add a note to README.Debian to the logrotate section though, what 
users of non-default inits need to consider.

Michael
[OpenPGP_signature (application/pgp-signature, attachment)]

Severity set to 'wishlist' from 'serious' Request was from Michael Biebl <[email protected]> to [email protected]. (Thu, 16 Feb 2023 20:45:06 GMT) (full text, mbox, link).


Changed Bug title to 'document log rotation on non-default inits' from 'rsyslog: Log rotation broken on non-systemd systems'. Request was from Michael Biebl <[email protected]> to [email protected]. (Thu, 16 Feb 2023 20:45:06 GMT) (full text, mbox, link).


Information forwarded to [email protected], Michael Biebl <[email protected]>:
Bug#1031399; Package rsyslog. (Thu, 16 Feb 2023 20:54:04 GMT) (full text, mbox, link).


Acknowledgement sent to Matthew Vernon <[email protected]>:
Extra info received and forwarded to list. Copy sent to Michael Biebl <[email protected]>. (Thu, 16 Feb 2023 20:54:04 GMT) (full text, mbox, link).


Message #19 received at [email protected] (full text, mbox, reply):

From: Matthew Vernon <[email protected]>
To: Michael Biebl <[email protected]>, [email protected]
Subject: Re: Bug#1031399: rsyslog: Log rotation broken on non-systemd systems
Date: Thu, 16 Feb 2023 20:52:21 +0000
On 16/02/2023 20:43, Michael Biebl wrote:

> I don't plan to re-add this (btw, this would break if 
> orphan-sysvinit-scripts is not installed).

A check for the presence of the init script would not be hard (and I'd 
happily write it and volunteer to fix any issues with it).

> I'll add a note to README.Debian to the logrotate section though, what 
> users of non-default inits need to consider.

Can I urge you to reconsider, please? Unless I'm missing something there 
isn't a way for this to work without /usr/lib/rsyslog/rsyslog-rotate 
doing the "rotate" of rsyslog, since that's what 
/etc/logrotate.d/rsyslog calls in its postrotate.

The only way this can plausibly work is if rsyslog-rotate does the 
rotation, and that means there has to be _some_ "else" clause in 
rsyslog-rotate.

I'm happy to offer patches to your spec, but I really do think the 
rsyslog package has to do a smidge of enabling work here.

Regards,

Matthew



Information forwarded to [email protected], Michael Biebl <[email protected]>:
Bug#1031399; Package rsyslog. (Fri, 17 Feb 2023 06:45:02 GMT) (full text, mbox, link).


Acknowledgement sent to Matthew Vernon <[email protected]>:
Extra info received and forwarded to list. Copy sent to Michael Biebl <[email protected]>. (Fri, 17 Feb 2023 06:45:03 GMT) (full text, mbox, link).


Message #24 received at [email protected] (full text, mbox, reply):

From: Matthew Vernon <[email protected]>
To: Michael Biebl <[email protected]>, [email protected]
Subject: Re: Bug#1031399: rsyslog: Log rotation broken on non-systemd systems
Date: Fri, 17 Feb 2023 06:43:27 +0000
[Message part 1 (text/plain, inline)]
Hi,

I've provided a minimal patch; given this is a Debian-specific file and 
not something you're going to have to deal with upstream about, is there 
any chance of you applying it for bookworm, please?

Log rotation isn't just about disk filling, other systems rely on its 
correct operation (hence my view this is RC) - I picked up on this when 
I realised that fail2ban had stopped working for ssh! It looks in 
/var/log/auth.log for entries, and that file was empty because of this 
failure.

Thank you for your consideration,

Matthew

[0001-attempt-to-rotate-on-non-systemd-systems-Closes-1031.patch (text/x-patch, attachment)]

Information forwarded to [email protected], Michael Biebl <[email protected]>:
Bug#1031399; Package rsyslog. (Wed, 26 Feb 2025 07:09:02 GMT) (full text, mbox, link).


Acknowledgement sent to Andrew Bower <[email protected]>:
Extra info received and forwarded to list. Copy sent to Michael Biebl <[email protected]>. (Wed, 26 Feb 2025 07:09:02 GMT) (full text, mbox, link).


Message #29 received at [email protected] (full text, mbox, reply):

From: Andrew Bower <[email protected]>
To: Michael Biebl <[email protected]>, [email protected]
Cc: Matthew Vernon <[email protected]>
Subject: Re: Bug#1031399: rsyslog: Log rotation broken on non-systemd systems
Date: Wed, 26 Feb 2025 07:04:37 +0000
Hi Michael,

On Thu, Feb 16, 2023 at 09:43:55PM +0100, Michael Biebl wrote:
> (btw, this would break if orphan-sysvinit-scripts is not installed).

That's a good point! Although addressed by a later version of Matthew's
patch, I wonder if this points towards a simpler solution of restoring
the initscript?

Since rsyslog became an optional package, users not using systemd must
surely now be making up a continually increasing proportion of the
users of rsyslog. With that changed context in mind, would you possibly
therefore reconsider whether to tolerate an initscript and supporting
integration for logrotation directly within the package, please?

I am sure there would be plenty of willigness to support and test any
such restored integration - I only see upsides for our users avoiding
convoluted workarounds!

Thanks!

Andrew



Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Fri May 16 09:35:42 2025; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.