← Back
Editing: gr_start_onboot_fail_restore_read_mode.test
################################################################################ # This test confirm that failures when starting group replication on boot # don't modify the read mode of server. # # Test: # 1. Restart server with --group_replication_bootstrap_group disabled and # --super_read_only enabled. # 2. Give some time to plugin fail to start # 3. Confirm that log contains message fails start group replication # 4. Assert SUPER_READ_ONLY= ON and READ_ONLY= ON. --source include/big_test.inc --source ../inc/have_group_replication_plugin.inc --source include/force_restart.inc SET SESSION sql_log_bin= 0; call mtr.add_suppression("Plugin group_replication reported: 'read failed'"); call mtr.add_suppression("Plugin group_replication reported: 'Timeout on wait for view after joining group'"); call mtr.add_suppression("\\[GCS\\] Error connecting to all peers. Member join failed. Local port:*"); call mtr.add_suppression("\\[GCS\\] The member was unable to join the group.*"); SET SESSION sql_log_bin= 1; --echo --echo # 1. Restart server with both --group_replication_start_on_boot --echo # and --super_read_only enabled. --echo ############################################################ # We need to restart server to simulate start_on_boot option since # on MTR it is impossible to compute ports on configuration files. --let $_group_replication_local_address= `SELECT @@GLOBAL.group_replication_local_address` --let $_group_replication_group_seeds= `SELECT @@GLOBAL.group_replication_group_seeds` --let $_group_replication_group_whitelist= `SELECT @@GLOBAL.group_replication_ip_whitelist` --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=0 --group_replication_start_on_boot=1 --super_read_only=1 --group_replication_ip_whitelist=$_group_replication_group_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 $_group_replication_group_whitelist GROUP_REPLICATION_GROUP_WHITELIST --source include/restart_mysqld.inc --echo --echo # 2. Give some time to plugin fail to start --echo ############################################################ --sleep 65 --echo --echo # 3. Confirm that log contains message fails start group --echo # replication --echo ############################################################ --let $assert_file= $MYSQLTEST_VARDIR/tmp/gr_start_onboot_fail_restore_read_mode.1.err --let $assert_count = 1 --let $assert_select = Timeout on wait for view after joining group --let $assert_text = Found the expected Group Replication start error in the server log --source include/assert_grep.inc --echo --echo # 4. Assert SUPER_READ_ONLY= ON and READ_ONLY= ON. --echo ############################################################ --source include/assert_and_disable_read_only.inc
Save File
Cancel