[MDEV-26171] wsrep_sst_receive_address does not parse IPv6 address in wsrep_node_address correctly Created: 2021-07-17 Updated: 2022-04-26 Resolved: 2022-04-12 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Galera SST |
| Affects Version/s: | 10.5.11, 10.9.0, 10.3.34, 10.4.24, 10.6.7, 10.7.3, 10.8.2 |
| Fix Version/s: | 10.3.35, 10.4.25, 10.5.16, 10.6.8, 10.7.4, 10.8.3, 10.9.1 |
| Type: | Bug | Priority: | Critical |
| Reporter: | William Edwards | Assignee: | Julius Goryavsky |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
`wsrep_sst_receive_address` defaults to `wsrep_node_address`. When `wsrep_node_address` is set to an IPv6 address and `wsrep_sst_receive_address` is not set or set to its default value of 'AUTO', `wsrep_node_address`'s IPv6 address does not seem to be parsed correctly. SST fails with:
I have not tested this with another SST method than rsync. Omitting brackets around the IPv6 address in `wsrep_node_address` does not make a difference. Non-functional config:
Functional config:
|
| Comments |
| Comment by William Edwards [ 2021-07-24 ] | |||
|
For future readers: commit 7e8a89387b's commit message says:
This issue is still present in MariaDB 10.3.30 and MariaDB 10.5.11, both of which include this commit. | |||
| Comment by Max Kondratenko [ 2021-10-18 ] | |||
|
This behaviour is due to wsrep_sst.cc wsrep_sst_prepare function. Variable wsrep_sst_receive_address is being used as rsync address without parsing. When wsrep_sst_receive_address is not present or is "AUTO", wsrep_node_address is used to generate the address by parsing it through wsrep_utils.h wsp::Address, which returns ipv6 address without square brackets. Square brackets are used by wsrep_sst_common.sh to determine if the address is ipv6, so all ipv6 addreses passed through wsrep_node_address will be concidered ipv4 due to lack of square brackets. There are possible solutions: | |||
| Comment by Max Kondratenko [ 2021-10-20 ] | |||
|
Here is a small patch I made which both improves addres generation consistensy between methods and adds square brackets around ipv6 addreses. This is only tested to compile without errors, but I am having trouble running the tests right now, so their results will be posted later. I would appreciate if anyone else tested this. ipv6.patch | |||
| Comment by Jan Lindström (Inactive) [ 2022-04-12 ] | |||
|
ok to push | |||
| Comment by Julius Goryavsky [ 2022-04-12 ] | |||
|
Fixed, https://github.com/MariaDB/server/commit/1a8cf23b7b6b381aeb97f6546f52b81749155ee0 |