[asterisk-bugs] [JIRA] (ASTERISK-30442) make install-logrotate causes logrotate to fail on service restart

Joshua C. Colp (JIRA) noreply at issues.asterisk.org
Mon Feb 27 04:03:03 CST 2023


     [ https://issues.asterisk.org/jira/browse/ASTERISK-30442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on ASTERISK-30442 started by N A.

> make install-logrotate causes logrotate to fail on service restart
> ------------------------------------------------------------------
>
>                 Key: ASTERISK-30442
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-30442
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Contrib/General
>    Affects Versions: 20.1.0
>         Environment: Linux 5.10.0-21-amd64 
> Debian 11.6 Virtual Machine
> logrotate 3.18.0
>            Reporter: EN Barnett
>            Assignee: N A
>
> Commit *55c53de022db2237723d57eb87305d709e4c808c* changed the first line of *contrib/scripts/asterisk.logrotate* to read
> {code}
> __LOGDIR__/debug.log __LOGDIR__/console __LOGDIR__/full.log __LOGDIR__/messages.log __LOGDIR__/*log {
> {code}
> Installing asterisk and running the service creates the file */var/log/asterisk/messages.log*.
> Running {{make install-logrotate}} installs */etc/logrorate.d/asterisk* from the above template. Then running {{systemctl restart logrotate}} results in a failed service for logrotate. Manually calling logrotate from the command line reveals the error is 
> {code}
> error: asterisk:1 duplicate log entry for /var/log/asterisk/messages.log
> error: found error in file asterisk, skipping
> {code}
> The "\*log" in the first line of the logrotate config is expanding to messages.log, which now means that file is listed twice, and the configuration is bad. The obvious fix is to remove all explicit .log files and just allow the file globbing to take care of that.
> {code}
> __LOGDIR__/console __LOGDIR__/*.log {
> {code}
> I didn't list this as a patch because I'm new and haven't gone through all of the disclaimer stuff, but hopefully a dev can pick this up and include it as a fix.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list