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

wsrep_sst_common.sh falsely parses address argument

Details

    Description

      The new (appeared somewhere between version 10.1.24 and 10.1.34) parsing of --address argument in wsrep_sst_common.sh does not produce expected results when the address does not have all the expected components or corresponding number of slashes included.

      I made a test script (just verbatim snippet from the script) to show how the parsing works

      This results into cluster nodes unable to sync using xtrabackup when WSREP_SST_OPT_LSN is set to xtrabackup_sst

      $ bash test.sh 12.13.14.15
      WSREP_SST_OPT_ADDR 12.13.14.15
      WSREP_SST_OPT_HOST 12.13.14.15
      WSREP_SST_OPT_HOST_UNESCAPED 12.13.14.15
      WSREP_SST_OPT_ADDR_PORT
      WSREP_SST_OPT_MODULE
      WSREP_SST_OPT_PATH 12.13.14.15
      WSREP_SST_OPT_LSN 12.13.14.15
      WSREP_SST_OPT_SST_VER 12.13.14.15
      $ bash test.sh 12.13.14.15:4444
      WSREP_SST_OPT_ADDR 12.13.14.15:4444
      WSREP_SST_OPT_HOST 12.13.14.15
      WSREP_SST_OPT_HOST_UNESCAPED 12.13.14.15
      WSREP_SST_OPT_ADDR_PORT 4444
      WSREP_SST_OPT_MODULE 4444
      WSREP_SST_OPT_PATH 12.13.14.15:4444
      WSREP_SST_OPT_LSN 12.13.14.15:4444
      WSREP_SST_OPT_SST_VER 12.13.14.15:4444
      $ bash test.sh 12.13.14.15:4444/xtrabackup_sst
      WSREP_SST_OPT_ADDR 12.13.14.15:4444/xtrabackup_sst
      WSREP_SST_OPT_HOST 12.13.14.15
      WSREP_SST_OPT_HOST_UNESCAPED 12.13.14.15
      WSREP_SST_OPT_ADDR_PORT 4444
      WSREP_SST_OPT_MODULE xtrabackup_sst
      WSREP_SST_OPT_PATH xtrabackup_sst
      WSREP_SST_OPT_LSN xtrabackup_sst
      WSREP_SST_OPT_SST_VER xtrabackup_sst
      $ bash test.sh 12.13.14.15:4444/xtrabackup_sst/123456
      WSREP_SST_OPT_ADDR 12.13.14.15:4444/xtrabackup_sst/123456
      WSREP_SST_OPT_HOST 12.13.14.15
      WSREP_SST_OPT_HOST_UNESCAPED 12.13.14.15
      WSREP_SST_OPT_ADDR_PORT 4444
      WSREP_SST_OPT_MODULE xtrabackup_sst
      WSREP_SST_OPT_PATH xtrabackup_sst/123456
      WSREP_SST_OPT_LSN 123456
      WSREP_SST_OPT_SST_VER 123456
      $ bash test.sh 12.13.14.15:4444/xtrabackup_sst/123456/789
      WSREP_SST_OPT_ADDR 12.13.14.15:4444/xtrabackup_sst/123456/789
      WSREP_SST_OPT_HOST 12.13.14.15
      WSREP_SST_OPT_HOST_UNESCAPED 12.13.14.15
      WSREP_SST_OPT_ADDR_PORT 4444
      WSREP_SST_OPT_MODULE xtrabackup_sst
      WSREP_SST_OPT_PATH xtrabackup_sst/123456/789
      WSREP_SST_OPT_LSN 123456
      WSREP_SST_OPT_SST_VER 789
      

      Attachments

        Activity

          jlunacek Jiri Lunacek added a comment -

          This goes back to commit e78e308e818 where incremental options first appeared.

          jlunacek Jiri Lunacek added a comment - This goes back to commit e78e308e818 where incremental options first appeared.
          danblack Daniel Black added a comment -

          jlunacek, apologies, hoping the PR attached fixes this. If you wouldn't mind doing a test beyond the script level output that I've done I'd appreciate it.

          danblack Daniel Black added a comment - jlunacek , apologies, hoping the PR attached fixes this. If you wouldn't mind doing a test beyond the script level output that I've done I'd appreciate it.

          People

            jplindst Jan Lindström (Inactive)
            jlunacek Jiri Lunacek
            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.