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:
@ -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();
|
||||
|
||||
Reference in New Issue
Block a user