Skip to content

Commit 3246e72

Browse files
committed
MDEV-25719: stunnel uses "verifyChain" without subject checks
Another batch of changes that should make the SST process more reliable in all scenarios: 1) Added hostname or CN verification when stunnel is used with certificate chain verification (verifyChain = yes); 2) Added check for the absence of the stunnel utility for mtr tests; 3) Deletion of working files before and after SST is done more accurately; 4) rsync on joiner can be run even if the path to its configuration file contains spaces; 5) More accurate directory creation (for data files and for logs); 6) IST with mysqldump no longer turns off statement logging; 7) Reset password for mysqldump when password is empty but username is specified; 8) More reliable quoting when generating statements in wsrep_sst_mysqldump; 9) Added explicit generation of 2048-bit Diffie-Hellman parameters for sockat < 1.7.3, by analogy with xtrabackup; 10) Compression parameters for qpress are read from all suitable server groups in configuration file, as well as from the [sst] and [xtrabackup] groups; 11) Added a test that checks compression using qpress; 12) Checking for optional utilities is modified to work even if they implemented as built-in shell commands (unlikely on real systems, but more reliable).
1 parent 00a8357 commit 3246e72

18 files changed

+337
-129
lines changed

mysql-test/suite/galera/disabled.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ galera_var_notify_cmd : MDEV-21905 Galera test galera_var_notify_cmd causes hang
4343
galera_var_reject_queries : assertion in inline_mysql_socket_send
4444
galera_var_replicate_myisam_on : MDEV-24062 Galera test failure on galera_var_replicate_myisam_on
4545
galera_var_retry_autocommit: MDEV-18181 Galera test failure on galera.galera_var_retry_autocommit
46-
galera_wan : MDEV-17259 Test failure on galera.galera_wan
46+
#galera_wan : MDEV-17259 Test failure on galera.galera_wan
4747
galera_wsrep_provider_unset_set: wsrep_provider is read-only for security reasons
4848
mysql-wsrep#198 : MDEV-24446: galera.mysql-wsrep#198 MTR failed: query 'reap' failed: 2000: Unknown MySQL error
4949
partition : MDEV-19958 Galera test failure on galera.partition
5050
pxc-421: wsrep_provider is read-only for security reasons
5151
query_cache: MDEV-15805 Test failure on galera.query_cache
52-
sql_log_bin : MDEV-21491 galera.sql_log_bin
52+
#sql_log_bin : MDEV-21491 galera.sql_log_bin
5353
versioning_trx_id: MDEV-18590: galera.versioning_trx_id: Test failure: mysqltest: Result content mismatch
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#
2+
# suite.pm will make sure that all tests including this file
3+
# will be skipped as needed
4+
#
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#
2+
# suite.pm will make sure that all tests including this file
3+
# will be skipped as needed
4+
#
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
SELECT 1;
2+
1
3+
1
4+
include/assert_grep.inc [Compressed qpress files found]

mysql-test/suite/galera/suite.pm

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,16 @@ push @::global_suppressions,
6767
qr|WSREP: Wait for gtid returned error 3 while waiting for prior transactions to commit before setting position|,
6868
);
6969

70+
sub which($) { return `sh -c "command -v $_[0]"` }
71+
7072
sub skip_combinations {
7173
my %skip = ();
72-
$skip{'include/have_mariabackup.inc'} = 'Need ss' unless `ss -V`;
74+
$skip{'include/have_mariabackup.inc'} = 'Need socket statistics utility'
75+
unless which("lsof") || which("sockstat") || which("ss");
76+
$skip{'include/have_stunnel.inc'} = "Need 'stunnel' utility"
77+
unless which("stunnel");
78+
$skip{'include/have_qpress.inc'} = "Need 'qpress' utility"
79+
unless which("qpress");
7380
%skip;
7481
}
7582

mysql-test/suite/galera/t/galera_ist_rsync.cnf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ wsrep_sync_wait=1
1010
[mysqld.2]
1111
wsrep_provider_options='base_port=@mysqld.2.#galera_port;pc.ignore_sb=true'
1212
wsrep_sync_wait=1
13-

mysql-test/suite/galera/t/galera_log_bin.cnf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ log-slave-updates
77
[mysqld.2]
88
log-bin
99
log-slave-updates
10-

mysql-test/suite/galera/t/galera_log_bin_opt.cnf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore
1212

1313
[sst]
1414
transferfmt=@ENV.MTR_GALERA_TFMT
15-
streamfmt=xbstream
15+
streamfmt=mbstream
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
!include ../galera_2nodes.cnf
2+
3+
[mysqld]
4+
wsrep_sst_method=mariabackup
5+
wsrep_sst_auth="root:"
6+
wsrep_debug=ON
7+
8+
[sst]
9+
transferfmt=@ENV.MTR_GALERA_TFMT
10+
compress=quicklz
11+
compress-threads=2
12+
compress-chunk-size=32768
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
2+
# This test checks that qpress compression works with mariabackup
3+
# Initial SST happens via mariabackup, so there is not much to do in the body
4+
# of the test
5+
#
6+
7+
--source include/big_test.inc
8+
--source include/galera_cluster.inc
9+
--source include/have_innodb.inc
10+
--source include/have_mariabackup.inc
11+
--source include/have_qpress.inc
12+
13+
SELECT 1;
14+
15+
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
16+
--source include/wait_condition.inc
17+
18+
# Confirm that transfer was compressed using qpress algorithm
19+
--let $assert_text = Compressed qpress files found
20+
--let $assert_select = Compressed qpress files found
21+
--let $assert_count = 1
22+
--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.2.err
23+
--let $assert_only_after = CURRENT_TEST
24+
--source include/assert_grep.inc

0 commit comments

Comments
 (0)