[MXS-2907] Logrotate warnings when PID file does not exist Created: 2020-03-02 Updated: 2020-08-25 Resolved: 2020-03-10 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | Packaging |
| Affects Version/s: | 2.4.7 |
| Fix Version/s: | 2.4.8 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Hartmut Holzgraefe | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
The logrotate script provided by MaxScale performs log rotation by sending the SIGUSR1 signal to the maxscale process as a postrotate action with kill -USR1 `cat /var/run/maxscale/maxscale.pid` When maxscale is not running for whatever reason, and so no PID file is present, this leads to annoying cron messages like
So the existence of the PID file should be checked for before using it, e.g.
or
PS: also note that the shell backtick syntax for command execution is deprecated, $(...) should be used instead these days ... |