[MDEV-16621] Fix logrotate script Created: 2018-06-29 Updated: 2021-12-11 Resolved: 2021-11-30 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients |
| Affects Version/s: | 10.3 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Sergey Vojtovich | Assignee: | Otto Kekäläinen |
| Resolution: | Duplicate | Votes: | 1 |
| Labels: | contribution, foundation | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Description |
|
Send SIGHUP, so root credentials are no longer needed to be set in a config file |
| Comments |
| Comment by Michal Schorm [ 2019-03-20 ] | ||
|
Also, consider using of "delaycompress" option. Without it, the user may encounter an error if the DB still use the file handle to write to the log. /etc/cron.daily/logrotate:
| ||
| Comment by Geoff Montee (Inactive) [ 2019-03-28 ] | ||
Thanks. I used the "delaycompress" tip for this KB article: https://mariadb.com/kb/en/library/rotating-logs-on-unix-and-linux/
Is it still desirable to use SIGHUP to flush the logs, now that root@localhost will use unix_socket authentication by default in 10.4? i.e. see It's pretty easy to enable unix_socket authentication for root@localhost in earlier versions too. danblack mentioned that SIGHUP will have the side effect of also flushing the binlogs, which can have a performance penalty. Should we make SIGHUP ignore exclude flushing the binlogs? | ||
| Comment by Daniel Black [ 2019-04-02 ] | ||
|
With the multiple authentication mechanisms of > Should we make SIGHUP ignore exclude flushing the binlogs? There are more impacts than binlogs (https://github.com/MariaDB/server/blob/10.4/sql/mysqld.cc#L3289-L3293) that could be reduced. Not sure if anything expects this behaviour. Maybe a different signal (USR1?) if the authentication mechanisms aren't sufficient. Very nice work GeoffMontee on the kb document. Note selinux bits of logrotate from https://mariadb.com/kb/en/library/what-to-do-if-mariadb-doesnt-start/#selinux-and-mariadb-path-changes and/or extend support-files/policy/selinux/mariadb-server.fc | ||
| Comment by Geoff Montee (Inactive) [ 2019-04-02 ] | ||
|
Thanks, danblack. I added a note about SELinux to the logrotate KB page. | ||
| Comment by Otto Kekäläinen [ 2021-04-04 ] | ||
|
Superseded by https://github.com/MariaDB/server/pull/1556 and | ||
| Comment by Robert Bindar [ 2021-11-30 ] | ||
|
Closing this dangling one, work on logrotate is being followed in |