1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
################################################################################
# This test verifies that Warning is thrown/logged when
# group_replication_ip_whitelist variable is used.
#
# Test:
# 0. The test requires one server.
# 1. Try setting group_replication_ip_whitelist variable to AUTOMATIC
# 2. Try setting group_replication_ip_whitelist variable.
# 3. Reboot server setting group_replication_ip_whitelist variable.
# 4. Cleanup.
################################################################################
--source include/have_debug.inc
--source include/have_group_replication_plugin.inc
--let $rpl_skip_group_replication_start= 1
--source include/group_replication.inc
--let $saved_gr_ip_whitelist = `SELECT @@GLOBAL.group_replication_ip_whitelist;`
--let $_group_replication_ip_whitelist="127.0.0.1/8"
--echo
--echo # 1. Try setting group_replication_ip_whitelist variable to AUTOMATIC
SET @@GLOBAL.group_replication_ip_whitelist= "AUTOMATIC";
--echo
--echo # 2. Try setting group_replication_ip_whitelist variable.
--eval SET @@GLOBAL.group_replication_ip_whitelist = $_group_replication_ip_whitelist;
# Error is thrown in client since group_replication_ip_whitelist
# has been used.
--source include/start_and_bootstrap_group_replication.inc
--let $assert_file= $MYSQLTEST_VARDIR/log/mysqld.1.err
--let $assert_only_after= CURRENT_TEST: group_replication.gr_ip_whitelist_deprecation
--let $assert_select= The syntax 'group_replication_ip_whitelist' is deprecated and will be removed in a future release. Please use group_replication_ip_allowlist instead.
--let $assert_count= 0
--let $assert_text= Deprecation warning is not logged when shown in client.
--source include/assert_grep.inc
--echo
--echo # 3. Reboot server setting group_replication_ip_whitelist variable.
--let $allow_rpl_inited=1
--let $_group_replication_local_address= `SELECT @@GLOBAL.group_replication_local_address`
--let $_group_replication_group_seeds= `SELECT @@GLOBAL.group_replication_group_seeds`
--let $restart_parameters=restart:--group_replication_group_name=$group_replication_group_name --group_replication_local_address=$_group_replication_local_address --group_replication_group_seeds=$_group_replication_group_seeds --group_replication_bootstrap_group=1 --group_replication_start_on_boot=1 --group_replication_ip_whitelist=$_group_replication_ip_whitelist
--replace_result $group_replication_group_name GROUP_REPLICATION_GROUP_NAME $_group_replication_local_address GROUP_REPLICATION_LOCAL_ADDRESS $_group_replication_group_seeds GROUP_REPLICATION_GROUP_SEEDS
--source include/restart_mysqld.inc
--let $rpl_server_number= 1
--source include/rpl_reconnect.inc
--let $group_replication_member_state= ONLINE
--source include/gr_wait_for_member_state.inc
--let $assert_file= $MYSQLTEST_VARDIR/log/mysqld.1.err
--let $assert_only_after= CURRENT_TEST: group_replication.gr_ip_whitelist_deprecation
--let $assert_select= The syntax 'group_replication_ip_whitelist' is deprecated and will be removed in a future release. Please use group_replication_ip_allowlist instead.
--let $assert_count= 1
--let $assert_text= Deprecation warning is logged when not shown in client.
--source include/assert_grep.inc
--echo
--echo # 4. Cleanup.
--source include/stop_group_replication.inc
SET SESSION sql_log_bin = 0;
call mtr.add_suppression("\\[GCS\\] Automatically adding IPv. localhost address to the allowlist. It is mandatory that it is added.");
SET SESSION sql_log_bin = 1;
--replace_result $saved_gr_ip_whitelist GROUP_REPLICATION_IP_WHITELIST
--eval SET @@GLOBAL.group_replication_ip_whitelist= $saved_gr_ip_whitelist
--let $allow_rpl_inited=1
--let $_group_replication_local_address= `SELECT @@GLOBAL.group_replication_local_address`
--let $_group_replication_group_seeds= `SELECT @@GLOBAL.group_replication_group_seeds`
--let $restart_parameters=restart:--group_replication_group_name=$group_replication_group_name --group_replication_local_address=$_group_replication_local_address --group_replication_group_seeds=$_group_replication_group_seeds --group_replication_bootstrap_group=1
--replace_result $group_replication_group_name GROUP_REPLICATION_GROUP_NAME $_group_replication_local_address GROUP_REPLICATION_LOCAL_ADDRESS $_group_replication_group_seeds GROUP_REPLICATION_GROUP_SEEDS
--source include/restart_mysqld.inc
--let $rpl_server_number= 1
--source include/rpl_reconnect.inc
--source include/group_replication_end.inc
|