[MDEV-26172] wsrep_sst_receive_address does not play well with local IP in /etc/hosts and DNS name Created: 2021-07-17  Updated: 2021-07-24

Status: Open
Project: MariaDB Server
Component/s: Galera SST
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: William Edwards Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by MDEV-23580 galera_3nodes.galera_ipv6_rsync_secti... Closed

 Description   

Up until MariaDB 10.3.28, `wsrep_sst_receive_address`'s behaviour was not correct. This configuration on MariaDB 10.3.28:

wsrep_sst_receive_address = http-jda02.dec.ha.cyberfusion.cloud:4444
wsrep_cluster_address="gcomm://[fc00:b6d:cfc:956::8],[fc00:b6d:cfc:956::11],[fc00:b6d:cfc:956::12]"
wsrep_provider_options = "gmcast.listen_addr=tcp://[::]:4567;ist.recv_addr=[fc00:b6d:cfc:956::11]:4568"
wsrep_sst_receive_address = "http-jda02.dec.ha.cyberfusion.cloud:4444"

... causes rsync to bind to :: and 0.0.0.0, while I would've expected it to bind to `fc00:b6d:cfc:956::11` (the IPv6 address that http-jda02.dec.ha.cyberfusion.cloud resolves to).

Starting from MariaDB 10.3.30, this same configuration causes rsync to bind to to `127.0.1.1:4444`, which makes sense, because my `/etc/hosts` contains:

127.0.0.1 localhost.localdomain localhost
127.0.1.1	http-jda02.dec.ha.cyberfusion.cloud http-jda02

I found commit 7e8a89387b which changed a lot of SST-related things, so I guess it's likely that this commit introduced the behaviour change.

Setting the local hostname to resolve to an IP address in 127.0.0.1/8 is quite common, so while this behaviour is correct, I'm not sure it's practical. I think I'll change `wsrep_sst_receive_address` to the node's IPv6 address for now (I didn't do that because of https://jira.mariadb.org/browse/MDEV-26171, which the mentioned commit did fix according to the changelog).



 Comments   
Comment by William Edwards [ 2021-07-24 ]

As the commit mentioned in MDEV-23580 is the only SST-related change according to the changelog, in both cases where I observed this behaviour change (MariaDB 10.3.28 to 10.3.30, and 10.5.9 to 10.5.11), I think this behaviour change may have been introduced by it.

Generated at Thu Feb 08 09:43:17 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.