[MDEV-18890] Cannot join a cluster anymore when using IPv6 in gmcast.listen_addr Created: 2019-03-11  Updated: 2019-04-15  Resolved: 2019-04-15

Status: Closed
Project: MariaDB Server
Component/s: Galera
Affects Version/s: None
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Damien Ciabrini Assignee: Jan Lindström (Inactive)
Resolution: Duplicate Votes: 1
Labels: galera, regression


 Description   

Since Galera 25.3.21 [1], it is now mandatory to enclose IPv6 addresses,
in square brackets when used in option gmcast.listen_addr, e.g.:

wsrep_provider_options = gmcast.listen_addr=tcp://[fd00:50c5:8119:5564:0:ee39:f850:c5f3]:4567;

This has a side effect on applications that try to join a running
galera cluster. Specifically, this makes
gcomm::AsioTcpSocket::connect(const gu::URI& uri) fail, due to the way
it configures the source address of the socket that is created to
connect to the galera cluster.

Before this IPv6 rework commit [1], it was implicitly expected that the source
address (local variable bind_ip) always receives an IP address as
configured in the GMCast object [2]: But since this IPv6 rework, the
string passed as a source address may now contain brackets when an
IPv6 is used, and this is considered an invalid input when calling
asio::ip::address::from_string() (which internally maps to inet_pton).

Consequently, one cannot force Galera to use a specific NIC anymore for
replication traffic with IPv6.

PS: I've cross-created an issue in codership's github [3], as I'm not sure
which upstream community to report the issue to.

[1] GAL-501 Improved URI parsing for IPv6 addresses, https://github.com/codership/galera/commit/c6ada002813093ab56e387ebe237a45600bbd775
[2] From GMCast::gmcast_connect: "bind outgoing connections to the same address as listening."
[3] https://github.com/codership/galera/issues/534



 Comments   
Comment by Damien Ciabrini [ 2019-03-14 ]

As a heads up to my bug report, the issue reported on codership's github [1] has been closed and is expected to be fixed in their next release. Not sure if mariadb just tracks codership's versions or if it manages its own fixes/patches on top.

[1] https://github.com/codership/galera/issues/534

Comment by Sergei Golubchik [ 2019-04-15 ]

It's fixed in galera sources, so let's say it should be tracked there

Generated at Thu Feb 08 08:47:30 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.