Fix failover_mysqlmon

The test should stop MaxScale when it is fixing the replication to prevent
the triggering of the standalone master detection.

Also removed leading spaces from the messages and fixed a possible crash with a
NULL value given to `ssh_node`.
This commit is contained in:
Markus Mäkelä
2018-03-19 10:26:02 +02:00
parent 64ccb67897
commit 02368473f7
2 changed files with 10 additions and 11 deletions

View File

@ -64,10 +64,9 @@ int main(int argc, char *argv[])
"@@server_id is different: %s != %s", maxscale_id, real_id);
test->close_maxscale_connections();
test->ssh_maxscale(true, "maxadmin clear server server1 maintenance");
test->ssh_maxscale(true, "maxadmin clear server server2 maintenance");
test->ssh_maxscale(true, "maxadmin clear server server3 maintenance");
test->stop_maxscale();
test->repl->fix_replication();
test->start_maxscale();
test->tprintf("Check that MaxScale is running ");
test->check_maxscale_alive();

View File

@ -1571,7 +1571,7 @@ int Mariadb_nodes::prepare_server(int i)
char str1[1024];
char str2[1024];
ssh_node(i, true, stop_db_command[i]);
ssh_node(i, true, "%s", stop_db_command[i]);
sleep(5);
ssh_node(i, true, "sed -i \"s/bind-address/#bind-address/g\" /etc/mysql/my.cnf.d/*.cnf");
ssh_node(i, true, "ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/usr.sbin.mysqld; sudo service apparmor restart");