| 1 |
--source include/galera_cluster.inc |
| 2 |
--source include/have_innodb.inc |
| 3 |
|
| 4 |
# Check that `wsrep_allowlist` variable is loaded |
| 5 |
SELECT COUNT(*) = 3 FROM mysql.wsrep_allowlist; |
| 6 |
|
| 7 |
--connection node_2 |
| 8 |
# Check that non-bootstrap nodes doesn't populate `mysql.wsrep_allowlist` |
| 9 |
SELECT COUNT(*) = 3 FROM mysql.wsrep_allowlist; |
| 10 |
|
| 11 |
--let $galera_connection_name = node_3 |
| 12 |
--let $galera_server_number = 3 |
| 13 |
--source include/galera_connect.inc |
| 14 |
|
| 15 |
# Save original auto_increment_offset values. |
| 16 |
--let $node_1=node_1 |
| 17 |
--let $node_2=node_2 |
| 18 |
--let $node_3=node_3 |
| 19 |
--source ../galera/include/auto_increment_offset_save.inc |
| 20 |
|
| 21 |
--connection node_3 |
| 22 |
# Desync and disconnect node 3 from the PC: |
| 23 |
SET @@global.wsrep_desync = 1; |
| 24 |
SET SESSION wsrep_sync_wait = 0; |
| 25 |
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1'; |
| 26 |
|
| 27 |
--connection node_1 |
| 28 |
# Wait until node 3 disappears from the PC: |
| 29 |
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; |
| 30 |
--source include/wait_condition.inc |
| 31 |
|
| 32 |
# Delete node ip (127.0.0.3) from allowlist |
| 33 |
DELETE FROM mysql.wsrep_allowlist WHERE ip LIKE '127.0.0.3'; |
| 34 |
|
| 35 |
SELECT COUNT(*) = 2 FROM mysql.wsrep_allowlist; |
| 36 |
|
| 37 |
--connection node_2 |
| 38 |
SELECT COUNT(*) = 2 FROM mysql.wsrep_allowlist; |
| 39 |
|
| 40 |
--connection node_3 |
| 41 |
# Reconnect node 2 to the PC: |
| 42 |
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0'; |
| 43 |
|
| 44 |
# We should reach Primary with cluster size = 1 because of `pc.ignore_quorum=TRUE and pc.wait_prim=FALSE` used in configuration |
| 45 |
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; |
| 46 |
--source include/wait_condition.inc |
| 47 |
|
| 48 |
# Resync should pass: |
| 49 |
SET @@global.wsrep_desync = 0; |
| 50 |
|
| 51 |
# Shutdown node |
| 52 |
--source include/shutdown_mysqld.inc |
| 53 |
|
| 54 |
--connection node_1 |
| 55 |
# Allow node 3 could be reconnected to cluster |
| 56 |
INSERT INTO mysql.wsrep_allowlist(ip) VALUES ('127.0.0.3'); |
| 57 |
|
| 58 |
--connection node_3 |
| 59 |
--source include/start_mysqld.inc |
| 60 |
--source include/wait_until_connected_again.inc |
| 61 |
|
| 62 |
--connection node_1 |
| 63 |
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; |
| 64 |
--source include/wait_condition.inc |
| 65 |
|
| 66 |
CALL mtr.add_suppression('WSREP: Connection not allowed'); |
| 67 |
|
| 68 |
--connection node_2 |
| 69 |
CALL mtr.add_suppression('WSREP: Connection not allowed'); |
| 70 |
|
| 71 |
--connection node_3 |
| 72 |
CALL mtr.add_suppression('WSREP: Ignoring lack of quorum'); |
| 73 |
|
| 74 |
# Restore original auto_increment_offset values. |
| 75 |
--source ../galera/include/auto_increment_offset_restore.inc |