From f95fff66320fc90d848e7983574e4fce51a4a0d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Thu, 6 Jul 2017 13:54:59 +0300 Subject: [PATCH] Stop replication before configuring binlogrouter The replication needs to be stopped before the binlogrouter is started. If the replication is stopped after this, it is possible that two servers with the same value of server_id attempt to register as slaves which causes the later of them to fail. --- maxscale-system-test/testconnections.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/maxscale-system-test/testconnections.cpp b/maxscale-system-test/testconnections.cpp index 59307c7a6..9fc9042b3 100644 --- a/maxscale-system-test/testconnections.cpp +++ b/maxscale-system-test/testconnections.cpp @@ -966,6 +966,8 @@ bool TestConnections::replicate_from_master() } mysql_close(conn); + repl->execute_query_all_nodes("STOP SLAVE"); + /** Clean up MaxScale directories */ ssh_maxscale(true, "service maxscale stop"); prepare_binlog(); @@ -974,7 +976,6 @@ bool TestConnections::replicate_from_master() char log_file[256] = ""; char log_pos[256] = "4"; - repl->execute_query_all_nodes("STOP SLAVE"); repl->connect(); execute_query(repl->nodes[0], "RESET MASTER");