Skip to content

Commit b3e531a

Browse files
janlindstromsysprg
authored andcommitted
MDEV-33896 : Galera test failure on galera_3nodes.MDEV-29171
Based on logs we might start SST before donor has reached Primary state. Because this test shutdowns all nodes we need to make sure when we start nodes that previous nodes have reached Primary state and joined the cluster. Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
1 parent 10d251e commit b3e531a

File tree

3 files changed

+57
-1
lines changed

3 files changed

+57
-1
lines changed

mysql-test/suite/galera_3nodes/disabled.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,4 @@ galera_ssl_reload : MDEV-32778 galera_ssl_reload failed with warning message
1616
galera_ipv6_mariabackup : temporarily disabled at the request of Codership
1717
galera_pc_bootstrap : temporarily disabled at the request of Codership
1818
galera_ipv6_mariabackup_section : temporarily disabled at the request of Codership
19-
MDEV-29171 : MDEV-33842 galera_3nodes.MDEV-29171 fails on shutdown_server
2019
GCF-354 : MDEV-25614 Galera test failure on GCF-354

mysql-test/suite/galera_3nodes/r/MDEV-29171.result

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,40 @@ connection node_2;
1919
connection node_1;
2020
connection node_1;
2121
# restart: --wsrep_new_cluster --wsrep_gtid_domain_id=200
22+
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
23+
VARIABLE_VALUE
24+
Primary
25+
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
26+
VARIABLE_VALUE
27+
Synced
2228
show variables like 'wsrep_gtid_domain_id';
2329
Variable_name Value
2430
wsrep_gtid_domain_id 200
2531
connection node_2;
2632
# restart
33+
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
34+
VARIABLE_VALUE
35+
Primary
36+
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
37+
VARIABLE_VALUE
38+
Synced
2739
show variables like 'wsrep_gtid_domain_id';
2840
Variable_name Value
2941
wsrep_gtid_domain_id 200
42+
connection node_1;
3043
connection node_3;
3144
# restart: --wsrep_sst_donor=node2
45+
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
46+
VARIABLE_VALUE
47+
Primary
48+
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
49+
VARIABLE_VALUE
50+
Synced
3251
show variables like 'wsrep_gtid_domain_id';
3352
Variable_name Value
3453
wsrep_gtid_domain_id 200
3554
connection node_1;
55+
connection node_1;
3656
set global wsrep_gtid_domain_id=100;
3757
connection node_2;
3858
set global wsrep_gtid_domain_id=100;

mysql-test/suite/galera_3nodes/t/MDEV-29171.test

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@ select @@wsrep_gtid_domain_id,@@wsrep_node_name;
5050
--connection node_1
5151
--let $restart_parameters = --wsrep_new_cluster --wsrep_gtid_domain_id=200
5252
--source include/start_mysqld.inc
53+
54+
--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
55+
--source include/wait_condition.inc
56+
--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
57+
--source include/wait_condition.inc
58+
--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'
59+
--source include/wait_condition.inc
60+
61+
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
62+
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
5363
show variables like 'wsrep_gtid_domain_id';
5464

5565
#
@@ -59,8 +69,21 @@ show variables like 'wsrep_gtid_domain_id';
5969
--let $restart_parameters =
6070
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
6171
--source include/start_mysqld.inc
72+
73+
--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
74+
--source include/wait_condition.inc
75+
--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
76+
--source include/wait_condition.inc
77+
--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'
78+
--source include/wait_condition.inc
79+
80+
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
81+
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
6282
show variables like 'wsrep_gtid_domain_id';
6383

84+
--connection node_1
85+
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
86+
--source include/wait_condition.inc
6487

6588
#
6689
# Restart node_3, select node_2 as donor
@@ -70,9 +93,23 @@ show variables like 'wsrep_gtid_domain_id';
7093
--let $restart_parameters = --wsrep_sst_donor="node2"
7194
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.3.expect
7295
--source include/start_mysqld.inc
96+
97+
--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
98+
--source include/wait_condition.inc
99+
--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
100+
--source include/wait_condition.inc
101+
--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'
102+
--source include/wait_condition.inc
103+
104+
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
105+
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
106+
73107
# Expect domain id 200
74108
show variables like 'wsrep_gtid_domain_id';
75109

110+
--connection node_1
111+
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
112+
--source include/wait_condition.inc
76113

77114
#
78115
# Cleanup

0 commit comments

Comments
 (0)