Move versions checks after nodes checks

In case when nodes/servers/replication/etc in backend are broken test can not
get proper version information and exits without doing anything.
To avoid it, test first checks backend, call fix_replication() if needed
and only after that tris to check if backend version is ok for this test
This commit is contained in:
Timofey Turenko
2019-04-15 13:01:03 +03:00
parent 4128937d37
commit 7ecc70fd5d

View File

@ -363,6 +363,30 @@ TestConnections::TestConnections(int argc, char *argv[]):
}
}
if ((restart_galera) && (galera))
{
galera->stop_nodes();
galera->start_replication();
}
if (maxscale::check_nodes)
{
if (repl)
{
if (!repl->fix_replication() )
{
exit(BROKEN_VM_FAUILT);
}
}
if (galera)
{
if (!galera->fix_replication())
{
exit(BROKEN_VM_FAUILT);
}
}
}
if (repl)
{
if (maxscale::required_repl_version.length())
@ -399,30 +423,6 @@ TestConnections::TestConnections(int argc, char *argv[]):
}
}
if ((restart_galera) && (galera))
{
galera->stop_nodes();
galera->start_replication();
}
if (maxscale::check_nodes)
{
if (repl)
{
if (!repl->fix_replication() )
{
exit(BROKEN_VM_FAUILT);
}
}
if (galera)
{
if (!galera->fix_replication())
{
exit(BROKEN_VM_FAUILT);
}
}
}
if (maxscale_init)
{
init_maxscales();