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

debian logrotate errors

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Trivial
    • Resolution: Duplicate
    • 10.3.18
    • N/A
    • Platform Debian
    • None

    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

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

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.