The test can fail if the Galera nodes aren't synced when the connection to
MaxScale is made. Adding a small sleep should allow the Galera cluster to
stabilize after the configuration switch.
When a client connects to MaxScale and authentication fails, an error
about hostname resolution is logged. This happens because the
authentication first tries to resolve the address as an IP address, then
an IPv6-mapped-IPv4 address and finally as a hostname. If users have not
been loaded, the authentication is guaranteed to fail on the first attempt
due to the lazy loading of users.
The default value for strict_multi_stmt prevents compound statements and
atomic multi-statement commands from being executed without completely
disabling load balancing. As the new default value will have no practical
effect on all correct uses of readwritesplit, this is a relatively safe
thing to change.
The cdc_datatypes test did not use the correct connector and instead it
used a stale version of the MaxScale CDC Connector. The connector should
be treated as an external dependency and thus cloned at configuration
time.
As the object name formatting is automated, so should the formatting of
object names in arguments. This also makes 2.2 backwards compatible with
2.1 commands.
If a service name contains spaced, e.g. "RW Split Router", those
spaces will be replaced with dashes at startup. Consequently, dashes
must be used when issuing commands.
The test environment is now checked to contain all executables needed for
testing before tests are built. They can be overridden by defining the
relevant HAVE_X variables (currently only HAVE_MYSQLTEST and HAVE_PHP are
defined).
Some of the tests waited for excessively long periods of time for changes
to propagate. With a one second monitor interval, a sleep of around five
seconds should be plenty enough for all monitor related changes to be
propagated to all systems.
- 1 master, 3 slaves
- "stop slave" on server 2
- "disable" log-bin on server 3
- set multi-source replication on server 4
- take down master
- no slave should be promoted
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.
- 1 master, 3 slaves
- stop maxscale so it does not autorejoin later on
- stop & reset slave on servers 3 & 4
- add data to server 4
- restart maxscale, check that server 3 is rejoined but not server 4
- manually set server 1 to replicate from server 4, creating a relay master
- check that servers 2 & 3 are redirected, making server 1 just a slave
- switchover master to server 1, check that it's the master
Also, moved some common functions into their own files. These functions
are used by multiple tests.
* 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
auto_failover=true
auto_rejoin=false
This test tests the following:
- Regular master-slave setup
- Create a table, insert some data
- Sync all slaves
- Stop a slave
- Insert some more data
- Sync remaining slaves
- Stop the master
- Expect the failover mechanism to pick a new master (server2)
- Bring up the slave
- Perform a switchover from server2 to server4
- Should fail
Currently it does fail, but only due to a timeout.
[mysqlmon] MASTER_GTID_WAIT() timed out on slave 'server4'.
There should be some check that would ensure that the failure happens
faster than that.
This test tests the following:
- Regular master-slave setup
- Create a table, insert some data
- Sync all slaves
- Stop a slave
- Insert some more data
- Sync remaining slaves
- Stop the master
- Expect the failover mechanism to pick a new master
- Bring up the slave
- Expect the slave to be rejoined
Previously, the rejoin would only be ran on servers with a connected slave io
thread. This patch runs the rejoin also on slaves which cannot connect to a
downed old master while the master hostname or port differs from the current
cluster master server.
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.