Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-5165

MariaDB Monitor rebuild server may try to chown "/var/lib/mysql/" instead of just "/var/lib/mysql"

    XMLWordPrintable

Details

    • MXS-SPRINT-215

    Description

      If rebuild target server is running, the monitor asks it where its datadir is with "select @@datadir;". This returns the directory with / at the end, and the value is used as is in later commands ("rm -rf <datadir>/*" and "chown -R mysql:mysql <datadir>". The latter command can fail if MaxScale does not have full sudo privs and instead the command is enabled with a sudoers.d-file with a line like "johnny ALL= NOPASSWD: /bin/chown -R mysql\:mysql /var/lib/mysql". The line is given in the documentation so may cause confusion.

      To reduce chances of confusion, the documentation should include both:

      johnny ALL= NOPASSWD: /bin/chown -R mysql\:mysql /var/lib/mysql
      johnny ALL= NOPASSWD: /bin/chown -R mysql\:mysql /var/lib/mysql/
      

      or perhaps alternatively

      johnny ALL= NOPASSWD: /bin/chown -R mysql\:mysql /var/lib/mysql/*
      

      The monitor should also remove the extra / from the directory returned by server.

      Attachments

        Activity

          People

            esa.korhonen Esa Korhonen
            esa.korhonen Esa Korhonen
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.