[MDEV-9890] wsrep_cluster_address does not accept IPv6 addresses Created: 2016-04-09  Updated: 2019-09-19  Resolved: 2019-09-19

Status: Closed
Project: MariaDB Server
Component/s: Galera
Affects Version/s: 10.1.8, 10.1.13
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Markus Ueberall Assignee: Jan Lindström (Inactive)
Resolution: Not a Bug Votes: 2
Labels: galera
Environment:

Ubuntu Xenial, Ubuntu Trusty


Issue Links:
Relates
relates to MDEV-11314 MariaDB Galera Cluister issue with in... Closed
relates to MDEV-18797 Make mariabackup/xtrabackup-v2 SST sc... Closed

 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.)



 Comments   
Comment by Geoff Montee (Inactive) [ 2019-03-02 ]

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?

Comment by Markus Ueberall [ 2019-03-03 ]

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.

Comment by Jan Lindström (Inactive) [ 2019-09-19 ]

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

Generated at Thu Feb 08 07:38:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.