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
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.
- The test starts with the usual setup of 1 master and 3 slaves.
- Then the master is taken down and it is checked that the failover
mechanism promotes some slave to master.
- This is continued until there is a single master left (no
slaves).
The test now again blocks the nodes instead of stopping them. This should
fix the Galera cluster "corruption" which appears to happen when there are
only two nodes in the cluster which are both started and stopped.
Combined functions into one which only used different default
values. Removed unused functions. Used std::string where possible to make
their usage easier. Hid code that isn't used externally.
The same test now has two versions. In the automatic version failover
begins automatically. In the manual version failover is started with
maxadmin. The tests are otherwise identical.
Current failover code better detects weird situations and refuses to work in one.
The test server slaves have events far ahead of the master in their binlogs,
causing the failover to stop. To fix this, slave binlogs are now deleted when
a test begins.
This is a partial cherry-pick of 9f11fdd2c122c9b30548c7ab55df8dda643ec659.
Use larger BLOB type for mxs812_1, the inserted value exceeds the normal
BLOB size.
Add a baseline check into bulk_insert to verify that direct connections
work (at the moment they don't, needs an investigation).
Modified avro_alter to prevent data type conversion errors.
Use larger BLOB type for mxs812_1, the inserted value exceeds the normal
BLOB size.
Add a baseline check into bulk_insert to verify that direct connections
work (at the moment they don't, needs an investigation).
Updated parameter names in failover_mysqlmon_mrm.
Modified avro_alter to prevent data type conversion errors.
When backend authentication failed due to errors other than wrong
credentials, the users were unconditionally reloaded. This caused a spike
of activity whenever authentication failed for other reasons.
Also fixed the test that checks for this to look for the correct error
message.
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.