Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
10.0(EOL), 10.1(EOL)
-
None
Description
From https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=830976
> Followup-For: Bug #830976
|
>
|
>
|
> I got errors from cron:
|
> /etc/cron.daily/logrotate:
|
> logrotate_script: 3: [: /var/run/mysqld/mysqld.pid: unexpected operator
|
>
|
> The reason I found: The postrotate script of /etc/logrotate.d/mysql-server
|
> contains
|
> my_print_defaults --mysqld | grep -oP "pid-file=\K[^$]+"
|
> and this generates on my machine two identical lines of output:
|
> /var/run/mysqld/mysqld.pid
|
> /var/run/mysqld/mysqld.pid
|
>
|
> So I added " | uniq" after the grep. Perhaps " | head -n1"
|
> would be even better.
|
|
|
I seems this was introduced in commit
|
https://anonscm.debian.org/cgit/pkg-mysql/mariadb-10.0.git/commit/debian/mariadb-server-10.0.mysql-server.logrotate?id=2948deb77b61f805e41b7032c71226a69d29a317
|
when importing upstream 10.0.25.
|
|
The original upstream commit that changed this was
|
https://github.com/MariaDB/server/commit/8942824a5304e23f765b88d07498786d80092843
|
|
I suggest you work directly with upstream to get this syntax fine
|
tuned and fixed globally.
|
Attachments
Issue Links
- is part of
-
MDEV-22659 Create one single unified and optimal logrotate config
- Closed
- links to