Commit Graph

73 Commits

Author SHA1 Message Date
ddf9002e86 Add tests with big backend
Basic tests can be executed with 15 machines Master/slave backend. Tests have label BIG_REPL_BACKEND Default template modified to support big backend. Tests temporaraly labeled as UNSTABLE to prevent their execution nightly
For big test maxscale.cnf is automatically generated for any number of nodes
2019-04-18 09:48:39 +03:00
eafb7ac5f1 Add tests with big backend
Basic tests can be executed with 15 machines Master/slave backend. Tests have label BIG_REPL_BACKEND Default template modified to support big backend. Tests temporaraly labeled as UNSTABLE to prevent their execution nightly
2019-04-15 14:35:24 +03:00
5e3af05d48 Speed up test startup
The VM connectivity and log truncation is now done in parallel.
2019-04-09 09:43:19 +03:00
cd732ac14f MXS-2243 System tests brings VMs by themselves (#193)
maxscale-system-test changed in order to control test environment by itself.
Every test checks which machines are running, compare with list of needed machines
and start new VMs is they are missing in the running machines list.
Tests are executiong MDBCI commands, MDBCI executable should be in the PATH
2019-04-02 13:27:34 +03:00
3081bfbb1e Merge branch '2.2' into 2.3 2019-03-11 10:49:06 +02:00
c132125d55 Fix log truncation
Syslog wasn't truncated which caused massive disk space usage when the
full test set was run.
2019-03-11 10:47:44 +02:00
8d6932abb2 fix compiler warnings in tests 2019-02-27 23:57:13 +02:00
e5cdefa69d MXS-2300: Add history pruning test
The test checks that the session command history pruning works as
expected.
2019-01-31 14:23:27 +02:00
f5f6a12484 Start Galera correctly
The Galera documentation tells us to use the galera_new_cluster command to
start a new Galera cluster. This should prevent the problems of nodes
failing to join the cluster either on the initial startup or after a node
goes down.
2019-01-16 10:01:58 +02:00
aa2572c677 Pass database as a parameter in connect
When connecting to a node, a database can now be optionally given as a
parameter. This makes testing with different databases easier as the need
to use the explicit functions is removed.
2018-11-22 13:51:08 +02:00
d60e97dfa5 Make node startup more robust
The connection attempts to all nodes are done over a period of time to
cope with slowly starting servers.
2018-11-19 20:02:11 +02:00
29d96662eb Add missing error message to check_replication
The version extraction could fail silently.
2018-11-15 14:24:41 +02:00
3092a744ed Enable verbose output on Galera startup failure
If a Galera node fails to start, enabling the verbose mode prints the
output of each SSH command. This fixes the visibility of the log file
printing.
2018-11-14 16:23:47 +02:00
07231747bf Print server logs on failure to start
When the MariaDB server exits with an error, the logs help explain why
that happened.
2018-11-14 16:23:47 +02:00
2650a9174e Fix addition of galera config options
The options weren't properly set as the galera nodes used different file
names.
2018-11-14 13:08:27 +02:00
0355398425 Fix typo in unblock_node
The command is called ip6tables.
2018-11-13 16:48:03 +02:00
eb1bc0b768 Add more error logging to Galera checks
The reason for the failure is now logged.
2018-11-09 09:13:27 +02:00
f085abf720 Use one ssh connection for block/unblock operations
As the ssh_node_f function supports full shell syntax, all of the work can
be done with a single ssh connection. This removes the overhead that each
extra ssh connection adds.
2018-11-09 09:13:27 +02:00
4e3d1a29b6 Clean up Galera_nodes::check_galera
The code can be simplified as only one of the nodes needs to be checked to
see how many nodes are in the cluster.
2018-11-09 09:13:26 +02:00
69bf3a90d3 Fix and improve Galera startup
A certain templated parameter was only substituted when the VMs were
provisioned. This needs to be handled by the test framework to allow
changes into Galera clusters configuration.

Also made the startup of the "lesser" nodes parallel so minimize the
startup time.
2018-11-09 09:13:26 +02:00
2ac1656fc7 Fix galera initialization
The galera configurations need pre-processing before they can be
used. Switched to std::endl to automatically flush the output at the end
of each line. This makes it easier to see what is happening when the tests
are ran by buildbot. Also removed the extra startup of the servers that
was done right after installing the database.
2018-11-09 09:13:26 +02:00
ccec2a387a Fix replication in parallel
If the replication is broken between the nodes, it is now fixed in
parallel on all nodes instead of doing it one server at a time.

This reduces the time from about 120 seconds to 13 seconds. The time was
measured by running the check_backend test first with all backends broken
and then with the fixed backends subtracting time of the latter from the
former.
2018-11-09 09:13:25 +02:00
71ffef5708 Partially revert 4ba011266843857bbd3201e5b925a47e88e1808f
Add back leading operator enforcement.
2018-09-20 15:57:30 +03:00
d11c78ad80 Format all sources with Uncrustify
Formatted all sources and manually tuned some files to make the code look
neater.
2018-09-10 13:22:49 +03:00
c447e5cf15 Uncrustify maxscale
See script directory for method. The script to run in the top level
MaxScale directory is called maxscale-uncrustify.sh, which uses
another script, list-src, from the same directory (so you need to set
your PATH). The uncrustify version was 0.66.
2018-09-09 22:26:19 +03:00
a13e95951b Merge branch '2.2' into develop 2018-08-30 11:37:49 +03:00
4fd6d075cb doc and astyle fixes 2018-08-29 12:00:52 +03:00
b98c0841b4 Enable and fix -Wextra warnings
Fixed all warnings that were present with -Wextra.
2018-07-03 15:07:19 +03:00
9737962add Add printf attribute to all variadic functions
The test methods that take printf style input now have the printf
attribute. This enables format checks making oversights less likely.

Also fixed any existing errors in the code. Only the one in
test_binlog_fnc.cpp would've had an actual effect.
2018-06-30 19:26:23 +03:00
5350817790 Flush hosts in parallel
The Mariadb_nodes class now performs the node flushing in parallel. This
should speed up startup. Also increased the max_connect_errors.
2018-06-20 08:45:18 +03:00
765806a633 Merge branch '2.2' into develop 2018-05-18 13:40:27 +03:00
e911c897f6 fix cnf name in add_server_setting() 2018-05-18 12:32:23 +03:00
f4bdf3012d Merge branch '2.2' into develop 2018-04-23 14:20:32 +03:00
0f0913fc99 Fix test build failures with GCC 8
GCC 8 enables -Werror=return-type by default which combined with -Werror
causes the build to fail.
2018-04-23 14:02:53 +03:00
f525822472 Merge branch '2.2' into develop 2018-03-20 13:14:54 +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
022c226d4b Mxs 1665 keepalived masterdown test (#171)
* add keepalived_masterdown test

* add missing cnfs
2018-03-16 15:14:14 +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
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
8bfb4f231a Merge branch '2.1' into 2.2 2018-03-06 10:38:01 +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
6a1aba70e7 Add test case for ignore_external_masters + failover
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.
2018-02-07 16:07:16 +02:00
4420730f31 Start all tests with read_only disabled
Explicitly checking and setting read_only allows all tests to have a
consistent backend state.
2018-02-07 16:07:16 +02:00
0d037b2c24 Add configuration reset command
Resetting the settings makes it possible to start a test from a known good
configuration.
2018-02-02 12:28:07 +02:00
8dfc1a141d fix typo in read_env() and set_env.sh 2018-01-15 17:17:44 +02:00
847dd2c120 fix typo in read_env() and set_env.sh 2018-01-15 16:47:15 +02:00
3c5963cf3b Reset default master node state as well
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.
2018-01-05 12:47:57 +02:00
3f0ef7481e Fix test build failure
The ssh_node_f function does not exist in 2.1.
2018-01-02 10:10:25 +02:00
6645281aeb add killing mysqld process after snapshot revert 2018-01-02 07:32:44 +02:00