Details

    Description

      I have been trying to create a Galera cluster with IPv6 networking. I know there's some other issues regarding this as well, I've probably read them.

      There's at least a few problems:

      wsrep_sst_common IPv6 address / port parsing is broken:

      $ bash -vx './wsrep_sst_common.sh' --address '[2001:db8::1]:3333/module/lsn_version/sst_ver/some_future_option1/some_future_option2' 2>&1 |grep WSREP_SST_OPT_PORT
              readonly WSREP_SST_OPT_PORT="$2"
        if [ -n "${WSREP_SST_OPT_PORT:-}" ]; then
          if [ "$WSREP_SST_OPT_PORT" != "$WSREP_SST_OPT_ADDR_PORT" ]; then
            echo "WSREP_SST: [ERROR] port in --port=$WSREP_SST_OPT_PORT differs from port in --address=$WSREP_SST_OPT_ADDR" >&2
          readonly WSREP_SST_OPT_PORT="$WSREP_SST_OPT_ADDR_PORT"
      + readonly 'WSREP_SST_OPT_PORT=[2001:db8::1]:3333'
      + WSREP_SST_OPT_PORT='[2001:db8::1]:3333'
      

      I went through the history of the script, and I think this commit is the one breaking it: https://github.com/MariaDB/server/commit/c22ab56f0d690feee471e173a3d95acb642cd6dc#diff-0b1123372bd9bf8a76dd8dd90aa3808d

      It was working after this pull request was merged: https://github.com/MariaDB/server/pull/644

      I tried with xtrabackup-v2 and mariabackup. The other problem is that mariabackup doesn't even use the variables parsed by the common script, so the IPv6 things are parsed there again and it's broken too.

      https://github.com/MariaDB/server/blob/10.2/scripts/wsrep_sst_mariabackup.sh#L519

      Attachments

        Issue Links

          Activity

            kuula Miika Kankare added a comment -

            I have yet to try a working wsrep_sst_common and xtrabackup-v2, maybe tomorrow.

            There was another issue on merging / removing mariabackup, but nothing seems to have happened there: https://jira.mariadb.org/browse/MDEV-14030

            kuula Miika Kankare added a comment - I have yet to try a working wsrep_sst_common and xtrabackup-v2, maybe tomorrow. There was another issue on merging / removing mariabackup, but nothing seems to have happened there: https://jira.mariadb.org/browse/MDEV-14030

            Set affects/fix versions based on the referenced commit only, without verification.

            elenst Elena Stepanova added a comment - Set affects/fix versions based on the referenced commit only, without verification.
            kuula Miika Kankare added a comment -

            Currently trying with 10.2.18, but looks like this affects other versions too.

            kuula Miika Kankare added a comment - Currently trying with 10.2.18, but looks like this affects other versions too.
            kuula Miika Kankare added a comment - - edited

            I first tried with the latest working version of wsrep_sst_common, namely: https://github.com/MariaDB/server/commit/6e55236c0a72e8f49a240c4e080591994042b0e4#diff-0b1123372bd9bf8a76dd8dd90aa3808d

            But naturally exploded horribly, as it's missing the additions that have come afterwards: --binlog-index and --innodb-data-home-dir for example.

            Then I grabbed the latest version of wsrep_sst_common from the 10.2 branch and reverted the few lines that ended up breaking the IPv6 parsing. This seemed to have worked, and the initial cluster creation and SST ran successfully.

            --- wsrep_sst_common.sh.10.2  2018-11-06 10:30:07.000000000 +0200
            +++ wsrep_sst_common.sh 2018-11-06 10:05:46.000000000 +0200
            @@ -44,14 +44,17 @@
                         addr_no_bracket=${WSREP_SST_OPT_ADDR#\[}
                         readonly WSREP_SST_OPT_HOST_UNESCAPED=${addr_no_bracket%%\]*}
                         readonly WSREP_SST_OPT_HOST="[${WSREP_SST_OPT_HOST_UNESCAPED}]"
            +            remain=${WSREP_SST_OPT_ADDR#*\]}
            +            remain=${remain#*:}
                         ;;
                     *)
                         readonly WSREP_SST_OPT_HOST=${WSREP_SST_OPT_ADDR%%[:/]*}
                         readonly WSREP_SST_OPT_HOST_UNESCAPED=$WSREP_SST_OPT_HOST
            +            remain=${WSREP_SST_OPT_ADDR#*:}
                         ;;
                     esac
            -        remain=${WSREP_SST_OPT_ADDR#${WSREP_SST_OPT_HOST}}
            -        remain=${remain#:}
            +        #remain=${WSREP_SST_OPT_ADDR#${WSREP_SST_OPT_HOST}}
            +        #remain=${remain#:}
                     readonly WSREP_SST_OPT_ADDR_PORT=${remain%%/*}
                     remain=${remain#*/}
                     readonly WSREP_SST_OPT_MODULE=${remain%%/*}
            

            But this change will probably end up breaking something else, as the commit that introduced the changes had: "fix galera sst tests".

            kuula Miika Kankare added a comment - - edited I first tried with the latest working version of wsrep_sst_common, namely: https://github.com/MariaDB/server/commit/6e55236c0a72e8f49a240c4e080591994042b0e4#diff-0b1123372bd9bf8a76dd8dd90aa3808d But naturally exploded horribly, as it's missing the additions that have come afterwards: --binlog-index and --innodb-data-home-dir for example. Then I grabbed the latest version of wsrep_sst_common from the 10.2 branch and reverted the few lines that ended up breaking the IPv6 parsing. This seemed to have worked, and the initial cluster creation and SST ran successfully. --- wsrep_sst_common.sh.10.2 2018-11-06 10:30:07.000000000 +0200 +++ wsrep_sst_common.sh 2018-11-06 10:05:46.000000000 +0200 @@ -44,14 +44,17 @@ addr_no_bracket=${WSREP_SST_OPT_ADDR#\[} readonly WSREP_SST_OPT_HOST_UNESCAPED=${addr_no_bracket%%\]*} readonly WSREP_SST_OPT_HOST="[${WSREP_SST_OPT_HOST_UNESCAPED}]" + remain=${WSREP_SST_OPT_ADDR#*\]} + remain=${remain#*:} ;; *) readonly WSREP_SST_OPT_HOST=${WSREP_SST_OPT_ADDR%%[:/]*} readonly WSREP_SST_OPT_HOST_UNESCAPED=$WSREP_SST_OPT_HOST + remain=${WSREP_SST_OPT_ADDR#*:} ;; esac - remain=${WSREP_SST_OPT_ADDR#${WSREP_SST_OPT_HOST}} - remain=${remain#:} + #remain=${WSREP_SST_OPT_ADDR#${WSREP_SST_OPT_HOST}} + #remain=${remain#:} readonly WSREP_SST_OPT_ADDR_PORT=${remain%%/*} remain=${remain#*/} readonly WSREP_SST_OPT_MODULE=${remain%%/*} But this change will probably end up breaking something else, as the commit that introduced the changes had: "fix galera sst tests".

            This problem seems to be fixed:

             bash -vx './wsrep_sst_common.sh' --address '[2001:db8::1]:3333/module/lsn_version/sst_ver/some_future_option1/some_future_option2' 2>&1 |grep WSREP_SST_OPT_PORT
                    readonly WSREP_SST_OPT_PORT="$2"
              if [ -n "${WSREP_SST_OPT_PORT:-}" ]; then
                if [ "$WSREP_SST_OPT_PORT" != "$WSREP_SST_OPT_ADDR_PORT" ]; then
                  echo "WSREP_SST: [ERROR] port in --port=$WSREP_SST_OPT_PORT differs from port in --address=$WSREP_SST_OPT_ADDR" >&2
                readonly WSREP_SST_OPT_PORT="$WSREP_SST_OPT_ADDR_PORT"
            + readonly WSREP_SST_OPT_PORT=3333
            + WSREP_SST_OPT_PORT=3333
            

            jplindst Jan Lindström (Inactive) added a comment - This problem seems to be fixed: bash -vx './wsrep_sst_common.sh' --address '[2001:db8::1]:3333/module/lsn_version/sst_ver/some_future_option1/some_future_option2' 2>&1 |grep WSREP_SST_OPT_PORT readonly WSREP_SST_OPT_PORT="$2" if [ -n "${WSREP_SST_OPT_PORT:-}" ]; then if [ "$WSREP_SST_OPT_PORT" != "$WSREP_SST_OPT_ADDR_PORT" ]; then echo "WSREP_SST: [ERROR] port in --port=$WSREP_SST_OPT_PORT differs from port in --address=$WSREP_SST_OPT_ADDR" >&2 readonly WSREP_SST_OPT_PORT="$WSREP_SST_OPT_ADDR_PORT" + readonly WSREP_SST_OPT_PORT=3333 + WSREP_SST_OPT_PORT=3333

            People

              jplindst Jan Lindström (Inactive)
              kuula Miika Kankare
              Votes:
              2 Vote for this issue
              Watchers:
              6 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.