| 1 |
############################################################################### |
| 2 |
# Validate that failover channels status is properly maintained, even when a |
| 3 |
# channel is reset when GR is not running. |
| 4 |
# |
| 5 |
# Test: |
| 6 |
# 0. This test requires two servers: |
| 7 |
# server1, server2: group |
| 8 |
# 1. Deploy a group in single-primary mode on server1 |
| 9 |
# configure a failover channel 'ch1'. |
| 10 |
# 2. Leave the group and only then reset the failover |
| 11 |
# channel 'ch1'. |
| 12 |
# 3. Deploy again a group in single-primary mode on server1. |
| 13 |
# 4. Join server2 to the group. |
| 14 |
# server2 successful join will validate that past ch1 |
| 15 |
# failover status is properly clean on server. |
| 16 |
# 5. Clean up. |
| 17 |
############################################################################### |
| 18 |
--source include/big_test.inc |
| 19 |
--source include/have_group_replication_plugin.inc |
| 20 |
--let $rpl_group_replication_single_primary_mode=1 |
| 21 |
--let $rpl_skip_group_replication_start= 1 |
| 22 |
--source include/group_replication.inc |
| 23 |
|
| 24 |
|
| 25 |
--echo |
| 26 |
--echo ############################################################ |
| 27 |
--echo # 1. Deploy a group in single-primary mode on server1 |
| 28 |
--echo # configure a failover channel 'ch1'. |
| 29 |
--let $rpl_connection_name= server1 |
| 30 |
--source include/rpl_connection.inc |
| 31 |
--source include/start_and_bootstrap_group_replication.inc |
| 32 |
|
| 33 |
CHANGE REPLICATION SOURCE TO SOURCE_HOST='10.0.0.1', SOURCE_USER='root', SOURCE_AUTO_POSITION=1, SOURCE_CONNECTION_AUTO_FAILOVER=1, SOURCE_PORT=3306, SOURCE_CONNECT_RETRY=1, SOURCE_RETRY_COUNT=1 FOR CHANNEL 'ch1'; |
| 34 |
|
| 35 |
|
| 36 |
--echo |
| 37 |
--echo ############################################################ |
| 38 |
--echo # 2. Leave the group and only then reset the failover |
| 39 |
--echo # channel 'ch1'. |
| 40 |
--let $rpl_connection_name= server1 |
| 41 |
--source include/rpl_connection.inc |
| 42 |
--source include/stop_group_replication.inc |
| 43 |
|
| 44 |
--let $rpl_channel_name='ch1' |
| 45 |
--let $rpl_multi_source= 1 |
| 46 |
--let $rpl_reset_slave_all= 1 |
| 47 |
--source include/rpl_reset_slave.inc |
| 48 |
--let $rpl_channel_name= |
| 49 |
--let $rpl_multi_source= |
| 50 |
|
| 51 |
|
| 52 |
--echo |
| 53 |
--echo ############################################################ |
| 54 |
--echo # 3. Deploy again a group in single-primary mode on server1. |
| 55 |
--let $rpl_connection_name= server1 |
| 56 |
--source include/rpl_connection.inc |
| 57 |
--source include/start_and_bootstrap_group_replication.inc |
| 58 |
|
| 59 |
|
| 60 |
--echo |
| 61 |
--echo ############################################################ |
| 62 |
--echo # 4. Join server2 to the group. |
| 63 |
--echo # server2 successful join will validate that past ch1 |
| 64 |
--echo # failover status is properly clean on server. |
| 65 |
--let $rpl_connection_name= server2 |
| 66 |
--source include/rpl_connection.inc |
| 67 |
--source include/start_group_replication.inc |
| 68 |
|
| 69 |
|
| 70 |
--echo ############################################################ |
| 71 |
--echo # 5. Clean up. |
| 72 |
--source include/group_replication_end.inc |