Hi,

Did some experimenting:

Well. Starting logrotate by hand revealed, that it errors out:

[root@localhost ~]# /usr/sbin/logrotate /etc/logrotate.conf
error: syslog-ng:1 duplicate log entry for /var/log/cron
error: syslog-ng:1 duplicate log entry for /var/log/maillog
error: syslog-ng:1 duplicate log entry for /var/log/messages
error: syslog-ng:1 duplicate log entry for /var/log/secure
error: syslog-ng:1 duplicate log entry for /var/log/spooler
error: found error in file syslog-ng, skipping

So, one problem is resolved, as there is no more file conflict with rsyslog. But we have another one.

- if we keep the file level conflict, then everything works properly, but rsyslog and syslog-ng can't be installed in parallel
- if there is no file level conflict then they can be installed in parallel, but reloading syslog-ng from logrotate does not work

What do you think?

Bye,

Peter Czanik (CzP) <peter.czanik@oneidentity.com>
Balabit (a OneIdentity company) / syslog-ng upstream
https://syslog-ng.com/community/
https://twitter.com/PCzanik


From: syslog-ng <syslog-ng-bounces@lists.balabit.hu> on behalf of Peter Czanik (pczanik) <Peter.Czanik@oneidentity.com>
Sent: Tuesday, February 18, 2020 14:15
To: syslog-ng@lists.balabit.hu <syslog-ng@lists.balabit.hu>
Subject: [syslog-ng] fedora/rhel & logrotate
 
CAUTION: This email originated from outside of the organization. Do not follow guidance, click links, or open attachments unless you recognize the sender and know the content is safe.

Hi,

Recently I received a bug report about logrotate and RHEL 8: https://bugzilla.redhat.com/show_bug.cgi?id=1802165 In RHEL 8 /etc/logroate.d/syslog is now rsyslog specific and thus conflicts with the same file coming from syslog-ng. I changed my test repo https://copr.fedorainfracloud.org/coprs/czanik/syslog-ng-githead/ in a way that RHEL 7 keeps using /etc/logroate/syslog, but all the Fedora and RHEL 8 packages change the logroate file name to /etc/logroate/syslog-ng.

Of course this means, that there is no conflict with rsyslog and there are two logrotate scripts for the same set of logs.

I am trying to test it on my own as well on RHEL 8, but any additional testing and feedback are very welcome!

Thanks,

Peter Czanik (CzP) <peter.czanik@oneidentity.com>
Balabit (a OneIdentity company) / syslog-ng upstream
https://syslog-ng.com/community/
https://twitter.com/PCzanik