-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PXC-4573: SST Role lacks INNODB_REDO_LOG_ARCHIVE
https://perconadev.atlassian.net/browse/PXC-4573 Problem: When SST xtrabackup is configured with redo-log-arch-dir option, pxb complains about the lack of INNODB_REDO_LOG_ARCHIVE privilege. Solution: Missing privilege granted for mysql.pxc.sst.role.
- Loading branch information
1 parent
9474967
commit ffd2b0e
Showing
5 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
mysql-test/suite/galera/r/galera_sst_xtrabackup-v2_privileges.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# restart | ||
include/assert_grep.inc [Check that innobackup.backup.log doesn't contain privilege-related errors] |
9 changes: 9 additions & 0 deletions
9
mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_privileges.cnf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
!include ../galera_2nodes.cnf | ||
|
||
[mysqld] | ||
wsrep_sst_method=xtrabackup-v2 | ||
wsrep_debug=1 | ||
|
||
[xtrabackup] | ||
redo-log-arch-dir='backup1:/tmp/mysql-redo-archive/' | ||
|
44 changes: 44 additions & 0 deletions
44
mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_privileges.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# | ||
# If PXB is configured with redo-log-arch-dir option, it complains about lack of INNODB_REDO_LOG_ARCHIVE during SST | ||
# | ||
|
||
--source include/galera_cluster.inc | ||
|
||
|
||
# Shutdown node2 and remove the grastate.dat file to force SST. | ||
--connection node_2 | ||
--source include/shutdown_mysqld.inc | ||
--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat | ||
|
||
# Wait until the cluster size is updated on node1. | ||
--connection node_1 | ||
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM performance_schema.global_status WHERE VARIABLE_NAME = 'wsrep_cluster_size'; | ||
--source include/wait_condition.inc | ||
|
||
# remove previous pxb log | ||
--remove_file $MYSQLTEST_VARDIR/mysqld.1/data/innobackup.backup.log | ||
# create redo-log-arch-dir | ||
--mkdir $MYSQL_TMP_DIR/redo-log-arch-dir | ||
|
||
# Start node_2 | ||
--connection node_2 | ||
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect | ||
--source include/start_mysqld.inc | ||
--source include/wait_until_connected_again.inc | ||
|
||
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM performance_schema.global_status WHERE VARIABLE_NAME = 'wsrep_cluster_size' | ||
--source include/wait_condition.inc | ||
|
||
|
||
# Check donor's innobackup.backup.log. It shouldn't contain error. | ||
--connection node_1 | ||
--let $assert_select = Access denied; you need (at least one of) the INNODB_REDO_LOG_ARCHIVE privilege(s) for this operation | ||
--let $assert_count_condition = ==0 | ||
--let $assert_text = Check that innobackup.backup.log doesn't contain privilege-related errors | ||
--let $assert_file = $MYSQLTEST_VARDIR/mysqld.1/data/innobackup.backup.log | ||
|
||
--source include/assert_grep.inc | ||
|
||
|
||
# cleanup | ||
--rmdir $MYSQL_TMP_DIR/redo-log-arch-dir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters