Commit 46d5e1f2 authored by Julius Goryavsky's avatar Julius Goryavsky

MDEV-10754 wsrep_sst_rsync does not support innodb_data_home_dir

If innodb_data_home_dir path specified in the configuration file
then rsync IST/SST will fail because the wsrep_sst_rsync.sh script
does not read this parameter from the configuration file and then
tries to find the data files in the default directory.

To fix this error, we need to add reading of the innodb_data_home_dir
configuration parameter to the rsync-related SST script.
parent 1fde449f
This diff is collapsed.
!include ../galera_2nodes.cnf
[mysqld]
wsrep_sst_method=rsync
innodb_data_home_dir=@ENV.MYSQL_TMP_DIR/rsync_test
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true'
--source include/big_test.inc
--source include/galera_cluster.inc
--let $node_1=node_1
--let $node_2=node_2
--source include/auto_increment_offset_save.inc
--source suite/galera/include/galera_st_shutdown_slave.inc
--source suite/galera/include/galera_st_clean_slave.inc
--source suite/galera/include/galera_st_kill_slave.inc
--source suite/galera/include/galera_st_kill_slave_ddl.inc
--source include/auto_increment_offset_restore.inc
# cleanup temporary database files:
--remove_files_wildcard $MYSQL_TMP_DIR/rsync_test *
--rmdir $MYSQL_TMP_DIR/rsync_test
......@@ -113,6 +113,12 @@ else
WSREP_LOG_DIR=$(cd $WSREP_SST_OPT_DATA; pwd -P)
fi
INNODB_DATA_HOME_DIR=${INNODB_DATA_HOME_DIR:-""}
# if INNODB_DATA_HOME_DIR env. variable is not set, try to get it from my.cnf
if [ -z "INNODB_DATA_HOME_DIR" ]; then
INNODB_DATA_HOME_DIR=$(parse_cnf --mysqld innodb-data-home-dir '')
fi
# Old filter - include everything except selected
# FILTER=(--exclude '*.err' --exclude '*.pid' --exclude '*.sock' \
# --exclude '*.conf' --exclude core --exclude 'galera.*' \
......@@ -121,7 +127,8 @@ fi
# New filter - exclude everything except dirs (schemas) and innodb files
FILTER=(-f '- /lost+found' -f '- /.fseventsd' -f '- /.Trashes'
-f '+ /wsrep_sst_binlog.tar' -f '+ /ib_lru_dump' -f '+ /ibdata*' -f '+ /*/' -f '- /*')
-f '+ /wsrep_sst_binlog.tar' -f '+ $INNODB_DATA_HOME_DIR/ib_lru_dump'
-f '+ $INNODB_DATA_HOME_DIR/ibdata*' -f '+ /*/' -f '- /*')
if [ "$WSREP_SST_OPT_ROLE" = "donor" ]
then
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment