[MDEV-13969] sst mysqldump and xtrabackup-v2 handle WSREP_SST_OPT_CONF incorrectly Created: 2017-09-30  Updated: 2017-12-18  Resolved: 2017-12-18

Status: Closed
Project: MariaDB Server
Component/s: Galera SST
Affects Version/s: 10.1.28, 10.2.9
Fix Version/s: 10.1.30, 10.2.12

Type: Bug Priority: Critical
Reporter: Andrii Nikitin (Inactive) Assignee: Sergei Golubchik
Resolution: Fixed Votes: 1
Labels: None

Issue Links:
Duplicate
is duplicated by MDEV-14034 test galera_sst_xtrabackup-v2 fails w... Closed
Relates
relates to MDEV-14030 Remove or Merge wsrep_sst_mariabackup Closed
Sprint: 10.2.10, 10.1.30

 Description   

Could not open required defaults file: /home/a/mariadb-environs/m1-system2/dt/--defaults-file=/home/a/mariadb-environs/m1-system2/my.cnf
Fatal error in defaults handling. Program aborted
2017-09-30 13:54:05 140004965337856 [ERROR] WSREP: Process completed with error: wsrep_sst_mysqldump --address '192.168.1.183:3308' --port '3308' --local-port '3307' --socket '/home/a/mariadb-environs/m1-system2/dt/my.sock'  --defaults-file '/home/a/mariadb-environs/m1-system2/my.cnf'  --gtid '9587a0be-a5b0-11e7-ab7b-2b5aa1592648:0' --gtid-domain-id '0': 1 (Operation not permitted)



 Comments   
Comment by Andrii Nikitin (Inactive) [ 2017-09-30 ]

Note that wsrep_sst_xtrabackup doesn't have --defaults-file keyword when using WSREP_SST_OPT_CONF (defined by wsrep_sst_common) :

INNOAPPLY="${INNOBACKUPEX_BIN} ${WSREP_SST_OPT_CONF} --apply-log \$rebuildcmd \${DATA} &>\${DATA}/innobackup.prepare.log"

While wsrep_sst_mysqldump still uses it with --defaults-file :

MYSQL="$MYSQL_CLIENT --defaults-extra-file=$WSREP_SST_OPT_CONF "\

Comment by Andrii Nikitin (Inactive) [ 2017-10-01 ]

It looks 10.2 is affected as well, just it doesn't pass --defaults-file parameter by default, so the error is harder to trigger.

Comment by Sergei Golubchik [ 2017-10-04 ]

pull request #457 seems related

Comment by Andrii Nikitin (Inactive) [ 2017-10-05 ]

Oh I also missed that INNOMOVE also has --defaults-file in wsrep_sst_xtrabackup-v2 , which results in error in 10.1.28:

+ eval 'innobackupex --defaults-file=--defaults-file=/home/a/env1/m2-10.1.28/my.cnf   --defaults-group=mysqld --no-version-check  --datadir=/home/a/env1/m2-10.1.28/dt/ --move-back --force-non-empty-directories ${DATA} &>${DATA}/innobackup.move.log'

And then in log:

Could not open required defaults file: /home/a/env1/m2-10.1.28/dt/--defaults-file=/home/a/env1/m2-10.1.28/my.cnf

so it must be fixed as well (or is it wsrep_sst_common which passes that incorrectly?)

Comment by Brendan P [ 2017-11-24 ]

Hi all, can we please have this fixed for 10.1.30 as well? Thank you.

Comment by Andrii Nikitin (Inactive) [ 2017-11-28 ]

Confirmed that current 10.1 is affected (build 17290) in this line https://github.com/MariaDB/server/blob/40756c9151a564b57f351111d7486b4d18ef5e39/scripts/wsrep_sst_xtrabackup-v2.sh#L868
E.g. test test galera_sst_xtrabackup-v2_encrypt_with_key show invalid value for the parameter:

Evaluating innobackupex --defaults-file=--defaults-file=/home/a/env3/mariadb-environs/_depot/m-tar/10.1-17290/mysql-test/var/my.cnf

both 5.5-galera and 10.0-galera are not affected. I am re-opening this ticket and let serg decide whether it may be re-closed and needs another ticket.

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