Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 827446 - app-admin/syslog-ng: reload by logrotate can fail due to config version upgrade
Summary: app-admin/syslog-ng: reload by logrotate can fail due to config version upgrade
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Tomáš Mózes
Depends on:
Reported: 2021-11-26 12:37 UTC by Andriy Utkin (RETIRED)
Modified: 2021-12-08 17:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
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/" ] ; then
  /bin/kill -HUP $(cat "/run/")

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.