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

Certain special characters in the maxscale user causes async-rebuild-server to fail

    XMLWordPrintable

Details

    • MXS-SPRINT-222

    Description

      Username and password were not quoted in the mariabackup remote command. This meant that any character with special shell handling would cause the command to fail. The fix passes the username and password in single quotes, e.g. --user='maxscale'. This should handle most special characters correctly. Single quotes themselves are still not supported inside usernames and passwords.

      Original description:

      If the maxscale user has a bracket in the password - ( or ) then the async-rebuild-server command fails with the following error:

      2024-10-17 04:52:13.915   error  : [mariadbmon] (serve_backup): Failed to stream data from db1. Command 'sudo mariabackup --user=****** --password=****** --backup --safe-slave-backup --target-dir=/tmp --stream=xbstream --parallel=1 | pigz -c | socat - TCP-LISTEN:4444,reuseaddr' stopped before data was streamed. Return value 2. Output: '' Error output: 'bash: -c: line 1: syntax error near unexpected token `)'\nbash: -c: line 1: `sudo mariabackup --user=maxscale --password=coiH7shaiDaichoh!) --backup --safe-slave-backup --target-dir=/tmp --stream=xbstream --parallel=1 | pigz -c | socat - TCP-LISTEN:4444,reuseaddr'\n'
      2024-10-17 04:52:13.915   error  : [mariadbmon] (serve_backup): Failed to stream data from db1. Command 'sudo mariabackup --user=****** --password=****** --backup --safe-slave-backup --target-dir=/tmp --stream=xbstream --parallel=1 | pigz -c | socat - TCP-LISTEN:4444,reuseaddr' stopped before data was streamed. Return value 2. Output: '' Error output: 'bash: -c: line 1: syntax error near unexpected token `)'\nbash: -c: line 1: `sudo mariabackup --user=maxscale --password=coiH7shaiDaichoh!) --backup --safe-slave-backup --target-dir=/tmp --stream=xbstream --parallel=1 | pigz -c | socat - TCP-LISTEN:4444,reuseaddr'\n'
      

      I have tried to enclose the password in quotes within the maxscale.cnf to no avail.

      In this test, the maxscale user password is coiH7shaiDaichoh!), note that if the password is set to coiH7shaiDaichoh! it doesn't throw the same error. It seems that only certain symbols have issues.

      Attachments

        Activity

          People

            esa.korhonen Esa Korhonen
            Ali.maria Alasdair Haswell
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.