Commit Graph

435 Commits

Author SHA1 Message Date
03310fa981 Add missing .cpp suffix
It doesn't appear to be necessary but other files use it.
2018-03-21 14:58:09 +02:00
433528aa59 MXS-1731: Treat empty parameters as errors
If a parameter is defined without a value, it is now treated as an error.
2018-03-21 14:58:09 +02:00
552c33e14d MXS-1719 Add test that reveals problem
With the masking filter, several UPDATEs as one multi-statement
causes the session to hang.
2018-03-21 14:58:09 +02:00
f525822472 Merge branch '2.2' into develop 2018-03-20 13:14:54 +02:00
94f29a11c5 MXS-1724: Reimplement core dump detection
Reimplemented the core dump detection for 2.2.
2018-03-20 13:06:20 +02:00
b0e0a79b46 Merge branch '2.1' into 2.2 2018-03-20 12:38:23 +02:00
02368473f7 Fix failover_mysqlmon
The test should stop MaxScale when it is fixing the replication to prevent
the triggering of the standalone master detection.

Also removed leading spaces from the messages and fixed a possible crash with a
NULL value given to `ssh_node`.
2018-03-20 10:59:08 +02:00
64ccb67897 Mark crashing tests as failed
If a test generates a core dump, it is marked as a failure.
2018-03-20 10:59:08 +02:00
022c226d4b Mxs 1665 keepalived masterdown test (#171)
* add keepalived_masterdown test

* add missing cnfs
2018-03-16 15:14:14 +02:00
749f43a70e MXS-1475 Add system test for @maxscale.cache.(soft_ttl|hard_ttl) 2018-03-16 14:34:04 +02:00
2ec19e2358 MXS-1475 Add test case for @maxscale.cache.[use|populate]
Also extend logging.
2018-03-16 14:34:04 +02:00
6afd57122d Merge branch '2.2' into develop 2018-03-16 12:39:55 +02:00
dad8e5da59 Sync slaves after creating tables in rwsplit_readonly
The test should synchronize the replication to avoid replication lag from
breaking the tests.
2018-03-15 23:24:08 +02:00
07cca088c9 MXS-1717: Fix test regressions
Due to the changes done for MXS-1717, the bug673 test had to be adjusted
and a newline has to be printed after users_diagnostic is called.
2018-03-15 23:23:15 +02:00
6a49f6ff0d MXS-359: Add test with master_failure_mode=error_on_write
Testing of routing behavior with master_failure_mode=error_on_write and
allow_master_changes=true. By sending an error instead of closing the
connection when the master fails, the connection can resume execution if a
new master becomes available.
2018-03-14 14:34:48 +02:00
62d4fa822d MXS-359: Test read-only mode and master replacement
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.
2018-03-14 14:34:48 +02:00
35b7ef35b7 MXS-359: Stop monitor before switching master
Stopping the monitor before changing the master is the closest thing to an
instant master switch.
2018-03-14 14:34:48 +02:00
dc48b8af4e Fix change_master function
The change_master function did not stop slaves on all servers before
reconfiguring them.
2018-03-14 14:34:48 +02:00
548c51c50d MXS-359: Fix mxs359_master_switch configuration
The test used the wrong parameter name.
2018-03-14 14:34:47 +02:00
9f5d2244ea Merge branch '2.2' into develop 2018-03-14 14:30:50 +02:00
d7c1d76065 Merge branch '2.1' into 2.2 2018-03-14 14:29:56 +02:00
36c960a141 Add helper functions and default parameters
Added some helper functions into the MaxScale class and default parameters
into the connection creation functions. Also made the ip() function const
correct.
2018-03-14 13:02:50 +02:00
464d52453b Add disconnect as an alias for close_connections
This way both MaxScale and backend connections have the same function
names.
2018-03-14 13:02:49 +02:00
2023ee4dc7 MXS-1713: Fix resultset collection code
The resultset collection was not detected early enough in the code which
caused partial results to be returned to the router.
2018-03-14 13:02:47 +02:00
2856b91077 Sync slaves before starting the test
Syncing the slaves should guarantee that the table exists on all servers.
2018-03-13 15:17:18 +02:00
4ce4c0b4c7 Merge branch '2.2' into develop 2018-03-13 13:35:19 +02:00
050e27685e Add various build script documents
Added documents that were left over from the build scripts repo.
2018-03-13 11:37:10 +02:00
dad6a4f9bf Merge branch '2.2' into develop 2018-03-13 11:26:41 +02:00
ff13fa633e Update .gitignore 2018-03-13 11:15:44 +02:00
b8bf0e4ba5 Add statement timeout to mxs1585
Timing out the statements and adding a LIMIT clause to the DELETE
statement should rule out backend server related problems. If the test
still times out, the problem is most likely in MaxScale.
2018-03-12 14:55:54 +02:00
5a62adc63e MXS-1678: Detect broken replication with Last_IO_Errno
This commit introduces changes that fix the relay master detection that
was broken by the merge from 2.1 into 2.2 by commit
1ecd791887994209eb29e56e1271f8c407cd0cdf.

In 2.2, the master server ID is used to detect whether a slave is actually
replicating from a master. The value is still displayed even if the slave
is not actively replicating from a master. The commit in 2.1 causes this
value to be stored unconditionally if it is available. By checking the
value of Last_IO_Errno and comparing it to a list of known error codes, we
know whether the slave is replicating properly.

The slave detection in 2.2 correctly identifies a broken slave with a
stopped IO thread. Due to this, the test case must be modified to check
that the relay master is not a slave if the IO thread is stopped.
2018-03-12 14:55:54 +02:00
69383c0943 Merge branch '2.2' into develop 2018-03-12 14:38:37 +02:00
f34cdc5607 Increase sleep in mxs812_2
The test appears to fail due to connection errors when it attempts to
check whether MaxScale is still alive. To offset the chance of the backend
server still refusing connections after the initial spike, the sleep
before the check was increased.
2018-03-09 20:56:00 +02:00
c5fef74f3f Use common functions in mxs1678_relay_master
The code had a note in that states that the test uses custom code
backported from 2.2 and that it should be updated to use common code once
merged into 2.2.

Added a small sleep to make sure the monitor picks up the changes in the
topology.
2018-03-09 20:53:56 +02:00
f2709ded1c MXS-359: Add master switch test case
The test case verifies that the router behaves in the expected manner with
regards to transaction state and type, autocommit state and statement
type.
2018-03-08 11:19:17 +02:00
af059e2be5 Increase timeouts and add maxadmin output to mxs1476
Increasing the timeout should remove any issues with server lag and
printing the maxadmin output should help diagnose the problem if it still
fails.
2018-03-06 15:58:20 +02:00
82839abc38 Increase timeouts and add maxadmin output to mxs1476
Increasing the timeout should remove any issues with server lag and
printing the maxadmin output should help diagnose the problem if it still
fails.
2018-03-06 12:47:20 +02:00
8bfb4f231a Merge branch '2.1' into 2.2 2018-03-06 10:38:01 +02:00
a0c890cdf6 Add maxadmin output to mxs1678_relay_master
This should make test failure analysis easier.
2018-03-05 14:02:41 +02:00
cab827b0a4 Fix replication after failover_mysqlmon
When the test finishes and is about to check whether MaxScale is alive,
the servers should be cleared from maintenance mode and the replication
should be fixed. This way the test will clean up after itself.
2018-03-05 14:02:41 +02:00
65216f5e16 Reset slave when changing master
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.
2018-03-05 14:02:41 +02:00
39d3c42c94 Merge branch '2.1' into 2.2 2018-03-01 17:52:42 +02:00
aab039f783 MXS-1677: Add test case
Added test case that reproduces the problem and verified that it is fixed.
2018-02-24 17:13:00 +02:00
8e31b30d19 MXS-1678: Add test case
Added test case that checks that relay master status is not lost when IO
thread is stopped.
2018-02-21 10:43:12 +02:00
e56aedb85f Reset failures if auto_failover is disabled
When auto_failover has been disabled due to failure to perform automatic
failover, the test should reset the number of failures. Resetting it
before the check for the log message allows the test to still fail if the
message is missing.
2018-02-20 09:59:05 +02:00
3c153291f2 Merge branch '2.1' into 2.2 2018-02-15 14:23:48 +02:00
b1300fdb01 Sync slaves after creating new users
After the users in the local_address test are created, the slaves need to
be synced to make sure that users have replicated to all servers.
2018-02-15 14:20:08 +02:00
5941f9d3b3 Silence debugging commands
If verbose mode is not enabled, the exact commands don't need to be
printed.
2018-02-14 14:47:03 +02:00
2e920af845 Change expected result of mysqlmon_rejoin_bad2
Instead of the current master rejoining to the diverged master, the
current master should remain as the master server. This behavior should be
explained by the extra GTID event injected by the failover process.
2018-02-13 11:35:13 +02:00
45ad6f943f Validate master data inside transaction
The insertion and subsequent read of the data into the master in
`generate_traffic_and_check` will now be done inside a transaction. This
keeps the behavior consistent with the `check` function that only inserts
one row.
2018-02-13 11:35:12 +02:00