Details
-
Bug
-
Status: Closed (View Workflow)
-
Trivial
-
Resolution: Duplicate
-
10.3.18
-
None
-
user@saihs:~$ uname -a
Linux saihs.renf.us 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u1 (2019-09-20) x86_64 GNU/Linux
user@saihs:~$ cat /etc/debian_version
10.1
user@saihs:~$ dpkg -l mariadb-server-10.3
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===================-======================-============-=================================
ii mariadb-server-10.3 1:10.3.18+maria~buster amd64 MariaDB database server binaries
renf@saihs:~$user@saihs :~$ uname -a Linux saihs.renf.us 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u1 (2019-09-20) x86_64 GNU/Linux user@saihs :~$ cat /etc/debian_version 10.1 user@saihs :~$ dpkg -l mariadb-server-10.3 Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-===================-======================-============-================================= ii mariadb-server-10.3 1:10.3.18+maria~buster amd64 MariaDB database server binaries renf@saihs :~$
Description
When logrotate is done, an error email is generated
/etc/cron.daily/logrotate:
logrotate_script: 3: [: /var/run/mysqld/mysqld.pid: unexpected operator
This is due to the command
my_print_defaults --mysqld | grep -oP "pid-file=\K[^$]+" |
generating multiple (in my case 3) output lines. Two of these are because pid-file is defines in /etc/mysql/my.cnf and in /etc/mysql/mariadb.conf.d/50-server.cnf.
The fix implemented in Debian proper is to limit this output to 1 line using
grep -m 1
|
.
Please update logrotate script line to
if [ -f $(my_print_defaults --mysqld | grep -m1 -oP "pid-file=\K[^$]+") ]; then |
Attachments
Issue Links
- is part of
-
MDEV-22659 Create one single unified and optimal logrotate config
- Closed