Bug ID 1173374
Summary speech-dispatcher logrotate
Classification openSUSE
Product openSUSE Tumbleweed
Version Current
Hardware Other
OS Other
Status NEW
Severity Normal
Priority P5 - None
Component Other
Assignee screening-team-bugs@suse.de
Reporter alexvkaam@gmail.com
QA Contact qa-bugs@suse.de
Found By ---
Blocker ---

hello,

during bootup today I noticed that logrotate failed:

systemctl status logrotate.service          
��� logrotate.service - Rotate log files
     Loaded: loaded (/usr/lib/systemd/system/logrotate.service; static; vendor
preset: disabled)
     Active: failed (Result: exit-code) since Thu 2020-06-25 17:14:28 CEST;
7min ago
TriggeredBy: ��� logrotate.timer
       Docs: man:logrotate(8)
             man:logrotate.conf(5)
   Main PID: 1384 (code=exited, status=1/FAILURE)

Jun 25 17:14:28 caladan systemd[1]: Starting Rotate log files...
Jun 25 17:14:28 caladan logrotate[1427]: logrotate_script: regel 1:
/etc/init.d/speech-dispatcher: No such file or directory
Jun 25 17:14:28 caladan logrotate[1384]: error: error running shared postrotate
script for '/var/log/speech-dispatcher/speech-dispatcher.log
/var/log/speech-dispatcher/speech-dispatcher-protocol.log '
Jun 25 17:14:28 caladan systemd[1]: logrotate.service: Main process exited,
code=exited, status=1/FAILURE
Jun 25 17:14:28 caladan systemd[1]: logrotate.service: Failed with result
'exit-code'.
Jun 25 17:14:28 caladan systemd[1]: Failed to start Rotate log files.

A bit of investigation led me to the file: /etc/logrotate.d/speech-dispatcher
from the package speech-dispatcher 0.9.1-4.2

In this file there is 2x this line:

/etc/init.d/speech-dispatcher reload >/dev/null

which no longer works as speech-dispatcher is controlled by systemd.

So I think these 2 entries should be changed to:

/usr/bin/systemctl reload speech-dispatcherd.service >/dev/null

however if speech-dispatcher.service is not enabled this will return a 1 and
not a 0 which might be seen as an error too by logrotate.service so maybe
something like this is needed:

if [ `/usr/bin/systemctl is-active speech-dispatcherd.service` = "active" ];
then /usr/bin/systemctl reload speech-dispatcherd.service >/dev/null ; fi

but not 100% sure, am not familiar with the postrotate in logrotate, but on the
CLI that works... or maybe there is a systemdctl option which only reloads when
active?

Alex


You are receiving this mail because: