[MDEV-26915] SST scripts do not take log_bin_index setting into account if it's not in the [mysqld] section Created: 2021-10-27  Updated: 2022-02-24  Resolved: 2021-11-23

Status: Closed
Project: MariaDB Server
Component/s: Galera SST
Affects Version/s: 10.4.12, 10.2.41, 10.3.32, 10.5.13, 10.6.5, 10.7.1, 10.8
Fix Version/s: 10.8.0, 10.2.42, 10.3.33, 10.4.23, 10.5.14, 10.6.6, 10.7.2

Type: Bug Priority: Major
Reporter: Valerii Kravchuk Assignee: Julius Goryavsky
Resolution: Fixed Votes: 0
Labels: None


 Description   

With settings like these:

log-bin                         = /data/mysql/log/hostname-bin
log-bin-index                   = /data/mysql/log/hostname.bdx

in [server] section of my.cnf, SST fails like this when removing the binary logs:

...
Oct 19 02:59:19 host-galera1 mysqld: removed ‘/data/mysql/log/hostname-bin.000287’
Oct 19 02:59:19 host-galera1 mysqld: removed ‘/data/mysql/log/hostname-bin.000277’
Oct 19 02:59:19 host-galera1 mysqld: removed ‘/data/mysql/log/hostname-bin.000281’
Oct 19 02:59:19 host-galera1 mysqld: rm: cannot remove ‘/data/mysql/log/*.index’: No such file or directory
...

Here (mariabackup-based) SST script assumes that binlog index file has extension of .index, instead of reading proper log_bin_index value from the config file. The real index file (hostname.bdx) does not get removed, but all binary logs do.

Then when SST completes, server is brought up and it reads the name of the binlog index file from [server] section, finding it. But in the index file there are filenames of deleted binary logs which are not found, so server shuts down.

See GitHub source code:

https://github.com/MariaDB/server/blob/2897ef099c500f53d4e2b9b162dc9b1c390ae6c4/scripts/wsrep_sst_common.sh#L514

to find out what only [mysqld] section is checked for binary log related settings, even in current 10.7.



 Comments   
Comment by Julius Goryavsky [ 2021-11-23 ]

Fixed:
10.2: https://github.com/MariaDB/server/commit/2f51511c0831a683cec68b021ffea3434078c851
10.4: https://github.com/MariaDB/server/commit/1ea7d5965012efba7b3abdc388a49c81157aacd1

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