[MDEV-17835] Remove wsrep-sst-method=xtrabackup Created: 2018-11-26  Updated: 2021-05-18  Resolved: 2019-01-23

Status: Closed
Project: MariaDB Server
Component/s: Galera SST
Affects Version/s: 10.3
Fix Version/s: 10.4.3, 10.3.13

Type: Bug Priority: Critical
Reporter: Jan Lindström (Inactive) Assignee: Julius Goryavsky
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-15522 Change galera suite MTR tests to use ... Closed
relates to MDEV-17291 Configuration allows incomaptible cho... Closed
relates to MDEV-17304 Replace use of XtraBackup with MariaD... Closed

 Description   
  • Disallow xtrabackup and xtrabackup-v2 sst methods
  • Remove tests and scripts


 Comments   
Comment by Sergei Golubchik [ 2018-11-26 ]

It'll break setups that use these methods (assuming there were cases when they worked).

Perhaps a less disruptive approach would be to symlink xtrabackup and xtrabackup-v2 scripts to mariabackup?
Or remove scripts completely and in the server (mysqld) treat wsrep_sst_method=xtrabackup as wsrep_sst_method=mariabackup.

Comment by Marko Mäkelä [ 2018-11-26 ]

As far as I can tell, xtrabackup is invoking InnoDB redo log processing by invoking innobase_start_or_create_for_mysql(), which in turn invokes recv_recovery_from_checkpoint_start() and then recv_find_max_checkpoint(), which should fail due to redo log format mismatch:

		switch (group->format) {
		case 0:
			return(recv_find_max_checkpoint_0(
				       max_group, max_field));
		case LOG_HEADER_FORMAT_CURRENT:
			break;
		default:
			/* Ensure that the string is NUL-terminated. */
			buf[LOG_HEADER_CREATOR_END] = 0;
			ib::error() << "Unsupported redo log format."
				" The redo log was created"
				" with " << buf + LOG_HEADER_CREATOR <<
				". Please follow the instructions at "
				REFMAN "upgrading-downgrading.html";
			/* Do not issue a message about a possibility
			to cleanly shut down the newer server version
			and to remove the redo logs, because the
			format of the system data structures may
			radically change after MySQL 5.7. */
			return(DB_ERROR);
}

This is the code that I originally added in MySQL 5.7.9.
I do not see how xtrabackup could possibly work with MariaDB Server 10.3. It should see an unrecognized format identifier 103 and display an informational message that the log file was created by MariaDB 10.3. I changed that message to say MariaDB in MDEV-11432.

jplindst, you claimed that the Galera tests for xtrabackup worked in 10.3. Can you confirm that? Could it be that the errors from xtrabackup were completely ignored?

Comment by Jan Lindström (Inactive) [ 2018-11-26 ]

SST tests fail and innobackup.backup.log contains

InnoDB: Unsupported redo log format. The redo log was created with MariaDB 10.3.12. Please follow the instr
uctions at http://dev.mysql.com/doc/refman/5.7/en/upgrading-downgrading.html

Comment by Marko Mäkelä [ 2018-11-26 ]

I believe that Docs/README-wsrep should stop mentioning xtrabackup already starting with MariaDB Server 10.1 or 10.2, and definitely must do so starting with 10.3. Other notable files listed by git grep -l xtrabackup include the following:

debian/mariadb-server-10.3.install
man/CMakeLists.txt
man/wsrep_sst_xtrabackup-v2.1
man/wsrep_sst_xtrabackup.1
scripts/wsrep_sst_xtrabackup-v2.sh
scripts/wsrep_sst_xtrabackup.sh
support-files/policy/selinux/mariadb-server.fc
support-files/policy/selinux/mariadb-server.te

Comment by Jan Lindström (Inactive) [ 2018-11-28 ]

Instructions

  • remove scripts completely and in the server (mysqld) treat wsrep_sst_method=xtrabackup[-v2] as wsrep_sst_method=mariabackup with a warning to log.
  • Remove xtrabackup from above files except sst scripts (as they are removed)
Comment by Julius Goryavsky [ 2018-12-17 ]

The xtrabackup-related scripts are removed and corresponding methods
(xtrabackup[-v2]) are dynamically replaced to the mariabackup (with a
corresponding warning in the log) when the server performs SST:

https://github.com/MariaDB/server/pull/1029

Comment by Marko Mäkelä [ 2018-12-27 ]

I think that several references to xtrabackup or innobackupex still have to be removed. Please refer to my comments.

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