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.
This commit is contained in:
Markus Mäkelä
2017-07-06 13:54:59 +03:00
parent 174dad4b5b
commit f95fff6632

View File

@ -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");