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

wsrep_cluster_address does not accept IPv6 addresses

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.1.8, 10.1.13
    • N/A
    • Galera
    • Ubuntu Xenial, Ubuntu Trusty

    Description

      According to https://mariadb.com/kb/en/mariadb/does-mariadb-support-ipv6/, ``The Galera wsrep_node_address setting has accepted ipv6 since MariaDB 10.1.8''.
      However, setting
      wsrep_cluster_address="gcomm://fd00::1,fd00::2,fd00::3"
      will result in

      [Warning] WSREP: Failed to resolve tcp://fd00::1
      [Warning] WSREP: Failed to resolve tcp://fd00::2
      [Warning] WSREP: Failed to resolve tcp://fd00::3

      Note that this is a parsing problem--substituting the aformentioned addresses with names will work:
      wsrep_cluster_address="gcomm://galera01.vserver01,galera01.vserver02,galera01.vserver03"

      (The latter, however, especially in the case of local addresses, requires you to use, e.g., unbound to map those names to addresses in the first place.)

      Attachments

        Issue Links

          Activity

            galera_ipv6_mariabackup.cnf added to the MariaDB automated tests with MDEV-18379 shows IPv6 addresses in wsrep_cluster_address enclosed in square brackets. See here:

            https://github.com/MariaDB/server/blob/4aea6b3e3f3fd1a8a2526bc40fc5e85e571d8242/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.cnf#L15

            Also see here:

            Colon ( characters in IPv6 addresses may conflict with the established syntax of resource identifiers, such as URIs and URLs. The colon has traditionally been used to terminate the host path before a port number.[9] To alleviate this conflict, literal IPv6 addresses are enclosed in square brackets in such resource identifiers, for example:

            http://[2001:db8:85a3:8d3:1319:8a2e:370:7348]/

            When the URL also contains a port number the notation is:

            https://[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443/

            where the trailing 443 is the example's port number.

            https://en.wikipedia.org/wiki/IPv6_address#Literal_IPv6_addresses_in_network_resource_identifiers

            Does it work for you if you enclose the addresses in square brackets?

            GeoffMontee Geoff Montee (Inactive) added a comment - galera_ipv6_mariabackup.cnf added to the MariaDB automated tests with MDEV-18379 shows IPv6 addresses in wsrep_cluster_address enclosed in square brackets. See here: https://github.com/MariaDB/server/blob/4aea6b3e3f3fd1a8a2526bc40fc5e85e571d8242/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.cnf#L15 Also see here: Colon ( characters in IPv6 addresses may conflict with the established syntax of resource identifiers, such as URIs and URLs. The colon has traditionally been used to terminate the host path before a port number. [9] To alleviate this conflict, literal IPv6 addresses are enclosed in square brackets in such resource identifiers, for example: http://[2001:db8:85a3:8d3:1319:8a2e:370:7348]/ When the URL also contains a port number the notation is: https://[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443/ where the trailing 443 is the example's port number. https://en.wikipedia.org/wiki/IPv6_address#Literal_IPv6_addresses_in_network_resource_identifiers Does it work for you if you enclose the addresses in square brackets?
            m_ueberall Markus Ueberall added a comment - - edited

            Sorry, I cannot retest this easily nowadays; a couple of months after filing the bug report, I removed all literal IP addresses from the configuration files for good (so the above does not concern me anymore) and am currently only using internal IPv4 networks for clusters.

            With the aforementioned setup and MariaDB 10.3.x, simply shutting down a node and changing wsrep_cluster_address to the old setting (both with and without square brackets) does not show the old "Failed to resolve" warning; this might, however, be well due to the rest of the setup referring to IPv4 addresses.

            (Looking at the old config files, I see that I used square brackets on one line, but not on the others; maybe I assumed that if parsing of the wsrep_node_address setting below did not trigger an error, the wsrep_cluster_address setting should work as well.)

            OUTDATED/galera.cnf.ipv6_vserver03:wsrep_node_address=fd00::1
            OUTDATED/galera.cnf.ipv6_vserver03:wsrep_cluster_address="gcomm://fd00::1,fd00::2,fd00::3"
            OUTDATED/galera.cnf.ipv6_vserver03:wsrep_provider_options="gmcast.listen_addr=tcp:[fd00::1]:4567; gcache.size=128M; gcache.name=/tmp/galera.cache; gcache.page_size=128M"
            OUTDATED/galera.cnf.ipv6_vserver03:wsrep_node_incoming_address=fd00::1
            OUTDATED/galera.cnf.ipv6_vserver03:wsrep_sst_receive_address=fd00::1
            

            Since you referred to an automatic test which uses square brackets the way you explained, adding the above reference/an example to the documentation of the wsrep* settings should be enough to close this.

            m_ueberall Markus Ueberall added a comment - - edited Sorry, I cannot retest this easily nowadays; a couple of months after filing the bug report, I removed all literal IP addresses from the configuration files for good (so the above does not concern me anymore) and am currently only using internal IPv4 networks for clusters. With the aforementioned setup and MariaDB 10.3.x, simply shutting down a node and changing wsrep_cluster_address to the old setting (both with and without square brackets) does not show the old "Failed to resolve" warning; this might, however, be well due to the rest of the setup referring to IPv4 addresses. (Looking at the old config files, I see that I used square brackets on one line, but not on the others; maybe I assumed that if parsing of the wsrep_node_address setting below did not trigger an error, the wsrep_cluster_address setting should work as well.) OUTDATED/galera.cnf.ipv6_vserver03:wsrep_node_address=fd00::1 OUTDATED/galera.cnf.ipv6_vserver03:wsrep_cluster_address="gcomm://fd00::1,fd00::2,fd00::3" OUTDATED/galera.cnf.ipv6_vserver03:wsrep_provider_options="gmcast.listen_addr=tcp:[fd00::1]:4567; gcache.size=128M; gcache.name=/tmp/galera.cache; gcache.page_size=128M" OUTDATED/galera.cnf.ipv6_vserver03:wsrep_node_incoming_address=fd00::1 OUTDATED/galera.cnf.ipv6_vserver03:wsrep_sst_receive_address=fd00::1 Since you referred to an automatic test which uses square brackets the way you explained, adding the above reference/an example to the documentation of the wsrep* settings should be enough to close this.

            These IPv6 issues should be fixed on more recent releases of MariaDB.

            jplindst Jan Lindström (Inactive) added a comment - These IPv6 issues should be fixed on more recent releases of MariaDB.

            People

              jplindst Jan Lindström (Inactive)
              m_ueberall Markus Ueberall
              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.