Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 827446

Summary: app-admin/syslog-ng: reload by logrotate can fail due to config version upgrade
Product: Gentoo Linux Reporter: Andriy Utkin (RETIRED) <andrey_utkin>
Component: Current packagesAssignee: Tomáš Mózes <hydrapolic>
Status: CONFIRMED ---    
Severity: normal CC: proxy-maint
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Andriy Utkin (RETIRED) gentoo-dev 2021-11-26 12:37:41 UTC
This is primarily a warning to others.
On individual level, it requires just a vigilant admin eye and a possibly manual restart command.
On the package level, it could be mitigated by changing a "reload" command by "restart". WONTFIX would also be a legit verdict, in my opinion.

I have upgraded the world, have run dispatch-conf, but haven't restarted syslog-ng afterwards, which is a necessary precondition to this issue.
I also run logrotate. Logrotate has a postrotate action to "reload" syslog-ng. This time it didn't produce the intended effect because the config file was rejected as of a format version the process didn't know. So syslog-ng process continued to write into the "retired" log file.

Nov 26 12:19:22 decent start-stop-daemon[3293]: Will stop PID 1622
Nov 26 12:19:22 decent start-stop-daemon[3293]: Sending signal 1 to PID 1622
Nov 26 12:19:22 decent syslog-ng[1622]: WARNING: Configuration file format is newer than the current version, please specify
 the current version number (3.30) in the @version directive. syslog-ng will operate at its highest supported version in this mode; config-version='3.33'
Nov 26 12:19:22 decent syslog-ng[1622]: Error reloading configuration; reason='Syntax error parsing configuration file'
Comment 1 Klemen Mihevc 2021-12-02 10:36:43 UTC
Started to get cron errors about this a month ago, finally figured its time to get to the bottom of this and found this... anyway instead of syslog-ng restart i went with:

if [ -s "/run/syslog-ng.pid" ] ; then
  /bin/kill -HUP $(cat "/run/syslog-ng.pid")
fi

i will see with weekly rotate if its fixed or not :)
Comment 2 Klemen Mihevc 2021-12-06 07:43:29 UTC
kill -HUP does not work, still get whiny emails about auth.log on logrotate.
Comment 3 Tomáš Mózes 2021-12-08 17:50:00 UTC
I thought it's a good practice to call something like restart-services after @world upgrades. You may run into trouble without doing so.