diff --git a/cicd/init.sh b/cicd/init.sh index 7eafe14..a1acc52 100755 --- a/cicd/init.sh +++ b/cicd/init.sh @@ -39,7 +39,17 @@ start_slave_cmd+="$start_slave_stmt" start_slave_cmd+='"' docker exec mysql_slave1 sh -c "$start_slave_cmd" +echo "Checking slave1 status" docker exec mysql_slave1 sh -c "export MYSQL_PWD=root; mysql -u root -e 'SHOW SLAVE STATUS \G' | grep Slave_" +echo "Checking slave1 GTID mode" +sudo docker exec mysql_slave1 sh -c "export MYSQL_PWD=root; mysql -u root -e 'SHOW VARIABLES' | grep gtid" +echo "Checking slave1 semisync" +sudo docker exec mysql_slave1 sh -c "export MYSQL_PWD=root; mysql -u root -e 'SHOW VARIABLES' | grep semi_sync" docker exec mysql_slave2 sh -c "$start_slave_cmd" -docker exec mysql_slave2 sh -c "export MYSQL_PWD=root; mysql -u root -e 'SHOW SLAVE STATUS \G' | grep Slave_" \ No newline at end of file +echo "Checking slave2 status" +docker exec mysql_slave2 sh -c "export MYSQL_PWD=root; mysql -u root -e 'SHOW SLAVE STATUS \G' | grep Slave_" +echo "Checking slave2 GTID mode" +sudo docker exec mysql_slave2 sh -c "export MYSQL_PWD=root; mysql -u root -e 'SHOW VARIABLES' | grep gtid" +echo "Checking slave2 semisync" +sudo docker exec mysql_slave2 sh -c "export MYSQL_PWD=root; mysql -u root -e 'SHOW VARIABLES' | grep semi_sync" diff --git a/cicd/mysql/mysql_master.conf b/cicd/mysql/mysql_master.conf index c0acfa6..ada05d4 100644 --- a/cicd/mysql/mysql_master.conf +++ b/cicd/mysql/mysql_master.conf @@ -13,5 +13,5 @@ binlog-checksum=crc32 gtid-mode=on enforce-gtid-consistency=true -rpl_semi_sync_master_enabled=1 -rpl_semi_sync_master_timeout=1000 +loose-rpl_semi_sync_master_enabled = 1 +loose-rpl_semi_sync_master_timeout=1000 diff --git a/cicd/mysql/mysql_slave1.conf b/cicd/mysql/mysql_slave1.conf index 9039664..6394ef9 100644 --- a/cicd/mysql/mysql_slave1.conf +++ b/cicd/mysql/mysql_slave1.conf @@ -15,4 +15,4 @@ gtid-mode=on enforce-gtid-consistency=true binlog-rows-query-log_events=1 -rpl_semi_sync_slave_enabled=1 \ No newline at end of file +loose-rpl_semi_sync_slave_enabled=1 diff --git a/cicd/mysql/mysql_slave2.conf b/cicd/mysql/mysql_slave2.conf index 5d6f470..2d3c245 100644 --- a/cicd/mysql/mysql_slave2.conf +++ b/cicd/mysql/mysql_slave2.conf @@ -15,4 +15,4 @@ gtid-mode=on enforce-gtid-consistency=true binlog-rows-query-log_events=1 -rpl_semi_sync_slave_enabled=1 \ No newline at end of file +loose-rpl_semi_sync_slave_enabled=1 diff --git a/test/dz003/REPORT.md b/test/dz003/REPORT.md index 11576c1..41ef341 100644 --- a/test/dz003/REPORT.md +++ b/test/dz003/REPORT.md @@ -150,12 +150,12 @@ binlog_do_db = app ### 8. Настроить полусинхронную репликацию. - #### Включаем динамическую загрузку модулей и полусинхронную репликацию с таймаутом 1с в my.cnf на мастере: ``` - rpl_semi_sync_master_enabled=1 - rpl_semi_sync_master_timeout=1000 + loose-rpl_semi_sync_master_enabled=1 + loose-rpl_semi_sync_master_timeout=1000 ``` - #### Включаем динамическую загрузку модулей и полусинхронную репликацию в my.cnf на обоих слейвах: ``` - rpl_semi_sync_slave_enabled=1 + loose-rpl_semi_sync_slave_enabled=1 ``` - #### Устанавливаем semisync плагин на мастере: ```