Added test cases that verify that the functionality works as
expected. Also made Mariadb_nodes::change_master less verbose when one of
the nodes is down.
When the test changes the master, it should reset the slave configuration
on the new master. This way no circular replication topologies are formed
and the monitor can be expected to perform correctly.
The test checks that failover works even when the master of the monitored
cluster is a slave to an external masters. The test also verifies that the
servers do not get unexpected status labels.
Now that mariadbmon supports failover and switchover, a test may
may change the master to some other node than node 0.
Consequently, as part of fixing the replication, gtid_slave_pos
of node 0 must be reset as well.
Verifying that the requested replication type matches the one that is
currently in use allows the resetting of the nodes to automatically set up
the correct replication type. This means that a test that invokes
`Mariadb_nodes::require_gtid(true)` before initializing the
TestConnections class is given a replication setup that uses GTID
coordinates instead of file and position.
The users are now created on both the slaves as well as the master. This
allows static binlog coordinates to be used on the slaves and the
replication initialization boils down to a set of SQL queries.
* refactor test backend fixing
* return comatibility with 5.5 for backend restore
* remove backend configuration scripts
* adopt test backed restore function for 2.2 test fw
With this change it is ensured that you do not see
ERROR 1198 (HY000) at line 28: This operation cannot be performed
as you have a running slave ''; run STOP SLAVE '' first
when the slave is reset.
Added some code to detect server states in a consistent manner and created
the test. The multi-source replication appeared to cause problems for the
test system which needs to be resolved.
Added --force flags to most direct `mysql` calls to prevent errors from
stopping the processing of remaining commands.
The test is composed of a few parts.
1: Test that failover happens on master failure.
2: Test that a server with slave sql thread stopped is not promoted.
3: Test that a server with log_slave_updates=1 is promoted before others.
The crash happens if the slave is not configured for replication or the
connection is broken when results are read. Adding missing return value
checks will fix it.
The ssh_node function now supports printf style arguments. This is used to
simplify command execution on the nodes.
Curreltny, in addition to its old usage, it is used to drop extra
databases when replication is started.
When a backend is waiting for a response but no statement is stored for
the session, the buffer where the stored statement is copied is not
modified. This means that it needs to be initialized to a NULL value.
Added a test that checks that the behavior works as expected even with
persistent connections. A second test reproduces the crash by executing
parallel SET commands while slaves are blocked.
There is still a behavioral problem in readwritesplit. If a session
command is being executed and it fails on a slave, an error is sent to the
client. In this case it would not be necessary to close the session if the
master is still alive.