[MDEV-26019] Upgrading MariaDB from 10.5.10 to 10.5.11 breaks TLS mariabackup SST Created: 2021-06-24 Updated: 2021-12-06 Resolved: 2021-06-26 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Galera SST, mariabackup, wsrep |
| Affects Version/s: | 10.6.2, 10.2.39, 10.3.30, 10.4.20, 10.5.11 |
| Fix Version/s: | 10.2.40, 10.3.31, 10.4.21, 10.5.12, 10.6.3 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Matthew Latin | Assignee: | Julius Goryavsky |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | galera, replication | ||
| Environment: |
Linux vc-galera01 5.4.114-1-pve #1 SMP PVE 5.4.114-1 (Sun, 09 May 2021 17:13:05 +0200) x86_64 x86_64 x86_64 GNU/Linux mysql Ver 15.1 Distrib 10.5.11-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2 |
||
| Issue Links: |
|
||||||||||||||||
| Description |
|
The upgrade from MariaDB from 10.5.10 to 10.5.11 breaks the wsrep_sst_mariabackup script. This is due to adding the commonname option to socat which at least on my end defaults to "localhost". There is also a typo (E and S swapped in ESCAPED) on line 389 that most likely is breaking something as well.
To just get the node up I had to make the following change on line 391 of wsrep_sst_mariabackup, which also triggered a very inconvenient SST.
Below is my log that led me to looking at the differences between the two versions:
|
| Comments |
| Comment by Julius Goryavsky [ 2021-06-25 ] |
|
https://github.com/MariaDB/server/commit/4ad148b148cfbb6f78b33ad9a7662f47c24cb759 and https://buildbot.askmonty.org/buildbot/grid?category=main&branch=bb-10.2-MDEV-26019-galera |
| Comment by Jan Lindström (Inactive) [ 2021-06-25 ] |
|
Ok to push if buildbot is happy |
| Comment by Julius Goryavsky [ 2021-06-26 ] |
|
Fixed: |
| Comment by Felix Huettner [ 2021-08-19 ] |
|
Hello everyone, I think the fix does not really cover the full issue. While the typo is gone now (which allows the donor to actually start up) the joiner still has the issue that socat is started with `commonname=localhost`. This will cause SST to fail as then the joiner will not validate the certificate of the donor correctly (as the certificate definately not matches localhost). This seems to be introduced here: https://github.com/MariaDB/server/commit/fe7e44d8ad5d7fe9c91f476353a3e1749f18afc6?branch=fe7e44d8ad5d7fe9c91f476353a3e1749f18afc6&diff=split#diff-1f9bb0e7c32584ac58bd554eeb3bb5f5f69b9310e7566d7566e71725926503dbR353 (in the diff of scripts/wsrep_sst_mariabackup.sh). Here the change removes the previous different behaviour between donor and joiner (where only the donor actually gets `commonname` set) and requires the common name for both the donor and the joiner. It is using the variable `WSREP_SST_OPT_HOST_UNESCAPED` for that which is always the hostname/ip of the joining node. Therefor the check here (https://github.com/MariaDB/server/blob/d1a948cfaaab67e699674af4c11efad3868a629d/scripts/wsrep_sst_mariabackup.sh#L387) reports for the joiner that it in fact is the local node and thereby sets `commonname=localhost`. To fix this i would propose to not append `$CN_option` at https://github.com/MariaDB/server/blob/d1a948cfaaab67e699674af4c11efad3868a629d/scripts/wsrep_sst_mariabackup.sh#L392 if `$WSREP_SST_OPT_ROLE = 'joiner'`. Thank you |
| Comment by Julius Goryavsky [ 2021-12-06 ] |
|
felix.huettner@mail.schwarz Thanks for the comment, this change was added to |