[MDEV-20193] backup option "--galera-info" FAILs creation of 'xtrabackup_*' files -> ERROR: "Failed to get master wsrep state from SHOW STATUS" Created: 2019-07-27  Updated: 2023-10-12

Status: Stalled
Project: MariaDB Server
Component/s: mariabackup
Affects Version/s: 10.3, 10.4, 10.5, 10.6, 10.7
Fix Version/s: 10.4

Type: Bug Priority: Major
Reporter: pgnd Assignee: Julius Goryavsky
Resolution: Unresolved Votes: 0
Labels: None


 Description   

running

	mariadb --version
		mariadb  Ver 15.1 Distrib 10.4.7-MariaDB, for Linux (x86_64) using readline 5.1
	mariabackup --version
		mariabackup based on MariaDB server 10.4.7-MariaDB Linux (x86_64)
	lsb_release -rd
		Description:    openSUSE Leap 15.1
		Release:        15.1

exec of a backup,

	mariabackup \
	  --user="testuser" \
	  --password="testpass" \
	 --backup \
	 --rsync \
	 --target-dir="/tmp/test" \

creates "xtrabackup_*" files

	cd /tmp/test
	find . | grep xtra
		xtrabackup_checkpoints
		xtrabackup_binlog_info
		xtrabackup_info

This is not YET a galera-cluster node.

Nonetheless, reading

https://mariadb.com/kb/en/library/mariabackup-options/#-galera-info

"...
If the server is not a Galera Cluster node, then this option has no effect.
..."

adding the "--galera-info"

	mariabackup \
	  --user="testuser" \
	  --password="testpass" \
	 --backup \
	 --rsync \
+	 --galera-info \
	 --target-dir="/tmp/test" \

now, backup exec DOES 'have an effect'
specifically, NO "xtrabackup_*" files are created

	cd /tmp/test
	find . | grep xtra
		(empty)

checking log,

	cat bkup.log
		[00] 2019-07-27 09:25:02 Connecting to MySQL server host: localhost, user: testuser, password: set, port: 3306, socket: /run/mariadb/mariadb.sock
		[00] 2019-07-27 09:25:02 Using server version 10.4.7-MariaDB-log
		/usr/local/mariadb/bin/mariabackup based on MariaDB server 10.4.7-MariaDB Linux (x86_64)
		[00] 2019-07-27 09:25:02 uses posix_fadvise().
		[00] 2019-07-27 09:25:02 cd to /data/db/mariadb/
		[00] 2019-07-27 09:25:02 Loading encryption plugin
		[00] 2019-07-27 09:25:02         Encryption plugin parameter :  '--file_key_management_encryption_algorithm=aes_ctr'
		[00] 2019-07-27 09:25:02         Encryption plugin parameter :  '--file_key_management_filekey=FILE:/etc/mariadb/enc/pass.txt'
		[00] 2019-07-27 09:25:02         Encryption plugin parameter :  '--file_key_management_filename=/etc/mariadb/enc/keys.enc'
		[00] 2019-07-27 09:25:02 open files limit requested 0, set to 65000
		[00] 2019-07-27 09:25:02 mariabackup: using the following InnoDB configuration:
		[00] 2019-07-27 09:25:02 innodb_data_home_dir =
		[00] 2019-07-27 09:25:02 innodb_data_file_path = ibdata1:12M:autoextend
		[00] 2019-07-27 09:25:02 innodb_log_group_home_dir = ./
		[00] 2019-07-27 09:25:02 InnoDB: Using Linux native AIO
		2019-07-27  9:25:02 0 [Note] InnoDB: Number of pools: 1
		[00] 2019-07-27 09:25:02 mariabackup: Generating a list of tablespaces
		2019-07-27  9:25:02 0 [Warning] InnoDB: Allocated tablespace ID 2 for mysql/innodb_index_stats, old maximum was 0
		[00] 2019-07-27 09:25:02 >> log scanned up to (143408)
		[01] 2019-07-27 09:25:02 Copying ibdata1 to /tmp/test/ibdata1
		[01] 2019-07-27 09:25:02         ...done
		[01] 2019-07-27 09:25:03 Copying ./mysql/innodb_index_stats.ibd to /tmp/test/mysql/innodb_index_stats.ibd
		[01] 2019-07-27 09:25:03         ...done
		[01] 2019-07-27 09:25:03 Copying ./mysql/innodb_table_stats.ibd to /tmp/test/mysql/innodb_table_stats.ibd
		[01] 2019-07-27 09:25:03         ...done
		[01] 2019-07-27 09:25:03 Copying ./mysql/transaction_registry.ibd to /tmp/test/mysql/transaction_registry.ibd
		[01] 2019-07-27 09:25:03         ...done
		[01] 2019-07-27 09:25:03 Copying ./mysql/gtid_slave_pos.ibd to /tmp/test/mysql/gtid_slave_pos.ibd
		[01] 2019-07-27 09:25:03         ...done
		[00] 2019-07-27 09:25:03 Starting prep copy of non-InnoDB tables and files
		[00] 2019-07-27 09:25:03 >> log scanned up to (143408)
		[00] 2019-07-27 09:25:03 Starting rsync as: rsync -t . --files-from=/run/mariadbtmp/xtrabackup_rsyncfiles_pass1 /tmp/test/
		[00] 2019-07-27 09:25:04 rsync finished successfully.
		[00] 2019-07-27 09:25:04 Finished a prep copy of non-InnoDB tables and files
		[00] 2019-07-27 09:25:04 Acquiring BACKUP LOCKS...
		[00] 2019-07-27 09:25:04 Starting to backup non-InnoDB tables and files
		[00] 2019-07-27 09:25:04 Starting rsync as: rsync -t . --files-from=/run/mariadbtmp/xtrabackup_rsyncfiles_pass2 /tmp/test/
		[00] 2019-07-27 09:25:04 rsync finished successfully.
		[00] 2019-07-27 09:25:04 Finished backing up non-InnoDB tables and files
		[01] 2019-07-27 09:25:04 Copying aria_log.00000001 to /tmp/test/aria_log.00000001
		[01] 2019-07-27 09:25:04         ...done
		[01] 2019-07-27 09:25:04 Copying aria_log_control to /tmp/test/aria_log_control
		[01] 2019-07-27 09:25:04         ...done
		[00] 2019-07-27 09:25:04 Waiting for log copy thread to read lsn 143408
		[00] 2019-07-27 09:25:04 >> log scanned up to (143408)
		[00] 2019-07-27 09:25:04 Failed to get master wsrep state from SHOW STATUS.
		mariabackup: Stopping log copying thread.[00] 2019-07-27 09:25:04 >> log scanned up to (143408)



 Comments   
Comment by Julius Goryavsky [ 2021-07-06 ]

julien.fritsch The strange behavior, is probably also an internal mariabackup problem, but it may be related to specific code for WSREP, so I'll see what is the reason here (before re-assigning the task, if necessary).

Comment by Pramod Mahto [ 2022-12-21 ]

KB Says : https://mariadb.com/kb/en/mariabackup-options/#-galera-info If the server is not a Galera Cluster node, then this option has no effect. But it does affect backup , backups keep failing for all CS versions

I have tested so far for the below version and its failed to complete the backup

Server version: 10.3.30-MariaDB MariaDB Server
Server version: 10.4.19-MariaDB MariaDB Server
Server version: 10.5.18-MariaDB MariaDB Server
Server version: 10.6.11-MariaDB MariaDB Server
Server version: 10.7.7-MariaDB MariaDB Server

Case 1 : root user with --galera-info option

 
mariabackup -u root --galera-info  --backup --target_dir=/tmp/backup/ > /tmp/backup/output.log 2>&1
 
[00] 2022-12-06 02:51:02 Failed to get master wsrep state from SHOW STATUS.
mariabackup: Stopping log copying thread.[00] 2022-12-06 02:51:02 >> log scanned up to (60976)

Case 2 : non root user with --galera-info option

 
mariabackup -u mariabackup -pMaria@128807 --backup --galera-info --target_dir=/tmp/backup/ > /tmp/backup/output.log 2>&1
 
[00] 2022-12-06 02:51:31 Failed to get master wsrep state from SHOW STATUS.
mariabackup: Stopping log copying thread.[00] 2022-12-06 02:51:31 >> log scanned up to (60976)

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