Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-20863

debian logrotate errors

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: In Progress (View Workflow)
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 10.3.18
    • Fix Version/s: 10.5
    • Component/s: Platform Debian
    • Labels:
      None
    • Environment:

      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

            Activity

              People

              Assignee:
              otto Otto Kekäläinen
              Reporter:
              robje RobJE
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated: