[MDEV-24903] mariabackup SST fails while adding --log-bin in startup command Created: 2021-02-17  Updated: 2021-03-19  Resolved: 2021-03-19

Status: Closed
Project: MariaDB Server
Component/s: Galera SST, Tests
Affects Version/s: 10.2, 10.3, 10.4, 10.5, 10.6
Fix Version/s: 10.2.38, 10.3.29, 10.4.19, 10.5.10, 10.6.0

Type: Bug Priority: Major
Reporter: Ramesh Sivaraman Assignee: Julius Goryavsky
Resolution: Fixed Votes: 0
Labels: None


 Description   

10.6.0 b19ec8848c9463b86d62601dffb67c75e3dfbd70 (Optimized)

Error Info
removed '/test/GAL_MD120221-mariadb-10.6.0-linux-x86_64-opt/node2/test/db.opt'
removed directory '/test/GAL_MD120221-mariadb-10.6.0-linux-x86_64-opt/node2/test'
dirname: unrecognized option '--log-bin'
Try 'dirname --help' for more information.
WSREP_SST: [ERROR] Cleanup after exit with status:1 (20210217 11:37:14.683)
2021-02-17 11:37:16 0 [Note] WSREP: (b6a541ea-8ee8, 'tcp://127.0.0.1:4208') turning message relay requesting off

Testcase

BASEDIR=/test/GAL_MD120221-mariadb-10.6.0-linux-x86_64-dbg
 
$BASEDIR/scripts/mysql_install_db --no-defaults --force --auth-root-authentication-method=normal --basedir=$BASEDIR --datadir=$BASEDIR/node1
$BASEDIR/scripts/mysql_install_db --no-defaults --force --auth-root-authentication-method=normal --basedir=$BASEDIR --datadir=$BASEDIR/node2
 
$BASEDIR/bin/mysqld --defaults-file=$PWD/n1.cnf --basedir=$BASEDIR --datadir=$BASEDIR/node1 --wsrep-provider=$BASEDIR/lib/libgalera_smm.so --log-bin --wsrep-new-cluster  &
$BASEDIR/bin/mysqld --defaults-file=$PWD/n2.cnf --basedir=$BASEDIR --datadir=$BASEDIR/node2 --wsrep-provider=$BASEDIR/lib/libgalera_smm.so --log-bin &
 
n1.cnf
 
[mysqld]
wsrep_cluster_address=gcomm://127.0.0.1:4108,127.0.0.1:4208
wsrep_provider_options="gmcast.listen_addr=tcp://127.0.0.1:4108;"
socket=node1_socket.sock
port=4100
log-error=node1.err
wsrep_node_address=127.0.0.1
wsrep_node_incoming_address=127.0.0.1
server-id=101
wsrep-debug=1
innodb_file_per_table
innodb_autoinc_lock_mode=2
wsrep_sst_method=mariabackup
wsrep_sst_auth=root:
binlog_format=ROW
core-file
log-output=none
wsrep_slave_threads=2
wsrep_on=1
n2.cnf
 
[mysqld]
wsrep_cluster_address=gcomm://127.0.0.1:4108,127.0.0.1:4208,
wsrep_provider_options="gmcast.listen_addr=tcp://127.0.0.1:4208;"
socket=node2_socket.sock
port=4200
log-error=node2.err
wsrep_node_address=127.0.0.1
wsrep_node_incoming_address=127.0.0.1
server-id=102
wsrep-debug=1
innodb_file_per_table
innodb_autoinc_lock_mode=2
wsrep_sst_method=mariabackup
wsrep_sst_auth=root:
binlog_format=ROW
core-file
log-output=none
wsrep_slave_threads=2
wsrep_on=1



 Comments   
Comment by Julius Goryavsky [ 2021-03-19 ]

Mariabackup SST fails if "-log-bin" option is added with no value to command line parameters at server startup. This is because the SST scripts do not correctly interpret the "-- log-bin" option without a value. This patch adds correct handling of the "--log-bin" parameter without value to the general part of the parameter parsing (for SST scripts) and fixes the problem. Also added a test that checks the correct operation of the server after the fix.

https://github.com/MariaDB/server/commit/d9688d12137bb0b8e8439a08a694235ac057295b

Comment by Jan Lindström (Inactive) [ 2021-03-19 ]

ok to push.

Comment by Julius Goryavsky [ 2021-03-19 ]

Fixed, https://github.com/MariaDB/server/commit/a74fa579b94bb35127ae8f55a50541ad8e558284

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