Details
-
Bug
-
Status: Done
-
Critical
-
Resolution: Done
-
5.7.22-29.26, 8.0.18-9.1
-
None
Description
There is a bug in SST script. It generates random key and put in to
$transition_key
variable.
But when SST script does backup it encloses $transition_key variable in single quotes
Here is example from SST trace log
/usr/bin/pxc_extra/pxb-8.0/bin/xtrabackup --defaults-file=/etc/my.cnf --defaults-group=mysqld --parallel=4 --user=mysql.pxc.sst.user --password=wtft8ze7nSV9BbC0yBv1h68g1bwos9op --socket=/tmp/mysql.sock --lock-ddl --backup --galera-info --binlog-info=ON *'--transition-key=$transition_key' *--stream=xbstream --xtrabackup-plugin-dir=/usr/bin/pxc_extra/pxb-8.0/lib/plugin --target-dir=/tmp/pxc_sst_4v5T/donor_xb_XgCu
Single quotes do not interpolate anything, get variable literal value (and lose its meaning). So transition key always equal to string "$transition_key". So we have hardcoded transition key for every backup which SST script does.
The right way is to enclose $transition_key variable to double quotes to get it real value (randomly generated transition key).
problematic code lineĀ https://github.com/percona/percona-xtradb-cluster/blob/8.0/scripts/wsrep_sst_xtrabackup-v2.sh#L1826