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

MariaDB Galera Cluister issue with internal IPv6 GCOMM network

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.1.17
    • N/A
    • Galera SST
    • RHEL7, internal IPv6 networking, 3 node Galera cluster
    • 5.5.59

    Description

      Configured internal IPv6 networking for galera cluster replication. First node creates new cluster successfully, but 2nd node is unable to join cluster when attempts SST rsync. Attached server.cnf is my /etc/my.cnf.d/server.cnf file.

      After I fixed the wsrep_sst_rsync script (in code shown below), the 2nd node successfully joined the cluster over IPv6.

      Here is the excerpt from /var/log/messages:

      2016-11-18T03:33:04.049379+08:00 db0 mysqld: 2016-11-18  3:33:04 140673315493632 [Note] WSREP: Running: 'wsrep_sst_rsync --role 'joiner' --address '2500:face:4567::6' --datadir '/mariadb/data/'   --parent '16184'  '' '
      2016-11-18T03:33:04.078435+08:00 db0 mysqld: rsync: face: invalid numeric value (in daemon mode)
      2016-11-18T03:33:04.078547+08:00 db0 mysqld: (Type "rsync --daemon --help" for assistance with daemon mode.)
      2016-11-18T03:33:04.078653+08:00 db0 mysqld: rsync error: syntax or usage error (code 1) at options.c(1005) [client=3.0.9]
      

      This is a bug in the following code in teh wsrep_sst_rsync script that doesn't support IPv6 format address:

          ADDR=$WSREP_SST_OPT_ADDR
          RSYNC_PORT=$(echo $ADDR | awk -F ':' '{ print $2 }') 
          if [ -z "$RSYNC_PORT" ]
          then
              RSYNC_PORT=4444
              ADDR="$(echo $ADDR | awk -F ':' '{ print $1 }'):$RSYNC_PORT"
          fi
      

      Attachments

        Issue Links

          Activity

            Hi, can you open a pull request for your contribution. Similar to other open source projects, the MariaDB Foundation needs to have shared ownership of all code that is included in the MariaDB distribution. The easiest way to achieve this is by submitting your code under the BSD-new license.

            The other alternative is to sign the code contribution agreement which can be found here: https://mariadb.com/kb/en/mariadb/mca/

            Please indicate in a comment in your pull request that you are contributing your new code of the whole pull request, including one or several files that are either new files or modified ones, under the BSD-new license or that you have filled out the contribution agreement and sent it.

            jplindst Jan Lindström (Inactive) added a comment - Hi, can you open a pull request for your contribution. Similar to other open source projects, the MariaDB Foundation needs to have shared ownership of all code that is included in the MariaDB distribution. The easiest way to achieve this is by submitting your code under the BSD-new license. The other alternative is to sign the code contribution agreement which can be found here: https://mariadb.com/kb/en/mariadb/mca/ Please indicate in a comment in your pull request that you are contributing your new code of the whole pull request, including one or several files that are either new files or modified ones, under the BSD-new license or that you have filled out the contribution agreement and sent it.
            danblack Daniel Black added a comment -

            Test something like this (after MDEV-15496 is fixed) as the wsrep_sst_common parses the address into host/port components already:

            diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh
            index 7fc83c1139c..f13930849f4 100644
            --- a/scripts/wsrep_sst_rsync.sh
            +++ b/scripts/wsrep_sst_rsync.sh
            @@ -309,14 +309,7 @@ then
                 fi
                 rm -rf "$RSYNC_PID"
             
            -    ADDR=$WSREP_SST_OPT_ADDR
            -    RSYNC_PORT=$(echo $ADDR | awk -F ':' '{ print $2 }')
            -    RSYNC_ADDR=$(echo $ADDR | awk -F ':' '{ print $1 }')
            -    if [ -z "$RSYNC_PORT" ]
            -    then
            -        RSYNC_PORT=4444
            -        ADDR="$(echo $ADDR | awk -F ':' '{ print $1 }'):$RSYNC_PORT"
            -    fi
            +    RSYNC_ADDR=$WSREP_SST_OPT_HOST
             
                 trap "exit 32" HUP PIPE
                 trap "exit 3"  INT TERM ABRT
            @@ -346,7 +339,7 @@ EOF
             
                 readonly RSYNC_PORT=${WSREP_SST_OPT_PORT:-4444}
                 # If the IP is local listen only in it
            -    if is_local_ip "$RSYNC_ADDR"
            +    if is_local_ip "$WSREP_SST_OPT_HOST_UNESCAPED"
                 then
                   rsync --daemon --no-detach --address "$RSYNC_ADDR" --port "$RSYNC_PORT" --config "$RSYNC_CONF" &
                 else
            

            Untested is if the logic in check_pid_and_port. lsof seems to expects escaped however grep has non literal meanings for '[ipv6]'. This whole function needs to be rewritten to use the capabilities of lsof to get the right output parsing its output (example - see wsrep_sst_xtrabackup-v2)

            danblack Daniel Black added a comment - Test something like this (after MDEV-15496 is fixed) as the wsrep_sst_common parses the address into host/port components already: diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh index 7fc83c1139c..f13930849f4 100644 --- a/scripts/wsrep_sst_rsync.sh +++ b/scripts/wsrep_sst_rsync.sh @@ -309,14 +309,7 @@ then fi rm -rf "$RSYNC_PID"   - ADDR=$WSREP_SST_OPT_ADDR - RSYNC_PORT=$(echo $ADDR | awk -F ':' '{ print $2 }' ) - RSYNC_ADDR=$(echo $ADDR | awk -F ':' '{ print $1 }' ) - if [ -z "$RSYNC_PORT" ] - then - RSYNC_PORT=4444 - ADDR= "$(echo $ADDR | awk -F ':' '{ print $1 }'):$RSYNC_PORT" - fi + RSYNC_ADDR=$WSREP_SST_OPT_HOST   trap "exit 32" HUP PIPE trap "exit 3" INT TERM ABRT @@ -346,7 +339,7 @@ EOF   readonly RSYNC_PORT=${WSREP_SST_OPT_PORT:-4444} # If the IP is local listen only in it - if is_local_ip "$RSYNC_ADDR" + if is_local_ip "$WSREP_SST_OPT_HOST_UNESCAPED" then rsync --daemon --no-detach --address "$RSYNC_ADDR" --port "$RSYNC_PORT" --config "$RSYNC_CONF" & else Untested is if the logic in check_pid_and_port. lsof seems to expects escaped however grep has non literal meanings for ' [ipv6] '. This whole function needs to be rewritten to use the capabilities of lsof to get the right output parsing its output (example - see wsrep_sst_xtrabackup-v2)
            rvlane Richard Lane added a comment -

            Can we have this looked at? Currently Galera does not support internal IPv6 network using rsync SST method. We have an application that wants to use Galera over IPv6 with rsync and they cannot get it to work. They have indicated that my workaround above did not work for them. I have requested their server.cnf file.

            rvlane Richard Lane added a comment - Can we have this looked at? Currently Galera does not support internal IPv6 network using rsync SST method. We have an application that wants to use Galera over IPv6 with rsync and they cannot get it to work. They have indicated that my workaround above did not work for them. I have requested their server.cnf file.

            In my understanding this has been fixed on more recent versions.

            jplindst Jan Lindström (Inactive) added a comment - In my understanding this has been fixed on more recent versions.

            People

              jplindst Jan Lindström (Inactive)
              rvlane Richard Lane
              Votes:
              6 Vote for this issue
              Watchers:
              10 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.