9301 Commits

Author SHA1 Message Date
Timofey Turenko
5c7845c381 Galera startup crash fix, temporal removal of revert snapshot (Galera does not survive revert)
and add cores saving from tests themselves.
2017-12-21 17:20:41 +02:00
Markus Mäkelä
4fd8ebd9eb Add missing include
The utils header was not included.
2017-12-21 12:28:54 +02:00
Markus Mäkelä
ff6bed6aeb Merge branch '2.1' into 2.2 2017-12-21 12:25:26 +02:00
Markus Mäkelä
6348ca7449 Add dependency on Jansson to the test core
The core library depends on Jansson and it must be built first.
2017-12-21 12:22:47 +02:00
Johan Wikman
3fb44e6b6e Make function const correct 2017-12-21 10:56:24 +02:00
Johan Wikman
96d084f1d6 Treat warnings as errors
Treat warnings as errors when compiling tests and fix where there
were problems.
2017-12-21 10:56:24 +02:00
Markus Mäkelä
071ab8302b Remove old stashed configurations
When new configuration files are stashed, remove the old ones first.
2017-12-21 10:48:08 +02:00
Markus Mäkelä
339ea9aedb Add a small delay to mxs1476
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.
2017-12-21 10:48:08 +02:00
Markus Mäkelä
0f015e6341 Don't log errors for unknown hostnames
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.
2017-12-21 10:48:08 +02:00
Markus Mäkelä
ee00539366 Fix mxs1509 output
The status dumping function now returns a string instead of a pointer to a
static buffer.
2017-12-21 10:48:08 +02:00
Markus Mäkelä
c1405bb493 Only block nodes in mxs1476
This is less of a disruption to the whole Galera cluster, which appears to
go non-primary if the nodes are stopped instead of blocked.
2017-12-21 10:48:07 +02:00
Markus Mäkelä
d4aeca0d24 Change strict_multi_stmt default value
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.
2017-12-21 10:48:07 +02:00
Markus Mäkelä
9062c31865 compound_statement: Drop table if it exists
It's not an error if the table already exists, whatever the reason.
2017-12-21 10:48:07 +02:00
Markus Mäkelä
6b0c6ffa64 Update bug673 with new maxadmin behavior
Both the old and new style object names must work with MaxAdmin.
2017-12-21 10:48:07 +02:00
Markus Mäkelä
c9aa504f50 Make start_node parameters const
The second parameter can be `const char*` as it is not modified. This
fixes a compiler warning.
2017-12-21 10:48:07 +02:00
Markus Mäkelä
26751ae44f Use correct CDC connector for cdc_datatypes
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.
2017-12-21 10:48:07 +02:00
Markus Mäkelä
91fc67b118 Automatically convert maxadmin arguments to new format
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.
2017-12-21 10:48:07 +02:00
Markus Mäkelä
a2acecd229 Fix test failures
Use correct parameter name for verify_master_failure and run MaxScale
explicitly as root in run_ctrl_c.sh.
2017-12-21 10:48:06 +02:00
Markus Mäkelä
0e8bdeae13 Add test for 10.1 compound statements
The test executes a compound statement through MaxScale and checks that it
is routed correctly to the master.
2017-12-21 10:48:06 +02:00
Markus Mäkelä
2008d08cfc Add hostname to lookup error message
This should help detect what is the hostname that causes the problem.
2017-12-21 10:48:06 +02:00
Markus Mäkelä
ec1a37000b Add more default parameter values
Added parameter default values to testconnections.h.
2017-12-21 10:48:05 +02:00
Johan Wikman
4d7c93f7c9 Rename test
We are testing switchover and not failover to a bad master
2017-12-21 10:24:03 +02:00
Johan Wikman
518a57f041 Change service name as spaces are replaced with dashes
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.
2017-12-20 16:09:44 +02:00
Markus Mäkelä
f7d8d1d965 Add test environment dependency checks
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).
2017-12-20 11:54:22 +02:00
Markus Mäkelä
b54dca50b5 Reduce excessive sleeping in tests
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.
2017-12-20 11:54:22 +02:00
Markus Mäkelä
9962191722 Add 10.3 SEQUENCE test
The test checks that the SEQUENCE related commands return the expected
values.
2017-12-20 11:54:21 +02:00
Markus Mäkelä
5e2ac6a921 Add default parameter values for methods in maxscales.h
As all current tests use only a single MaxScale, explicitly requiring the
number of the MaxScale to use is not convenient.
2017-12-20 11:54:21 +02:00
Esa Korhonen
f9e8af83ce MXS-1570: Test failover with no good candidate
- 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
2017-12-20 11:00:13 +02:00
Timofey Turenko
a5d2dc5ac7
fix repositoy signature with sha256 (#154) 2017-12-19 23:31:18 +02:00
Timofey Turenko
e0c88a38ac
fix rsync source copying command to copy also .git (#153) 2017-12-19 23:30:01 +02:00
Markus Mäkelä
8509cf9725 MXS-1581: Add note to limitations
Added CREATE TABLE ... SELECT into the list of avrorouter related
limitations.
2017-12-19 21:14:15 +02:00
MassimilianoPinto
0a6ef8713b 2.2.1 Release notes update
2.2.1 Release notes update
2017-12-19 16:25:06 +01:00
Markus Mäkelä
9fa059c2a2 Request GTID replication in tests that require it
Added the required calls to request GTID replication in the mysqlmon
failover tests.
2017-12-19 17:10:36 +02:00
Johan Wikman
fab2eab0fd MXS-1568 Rolling restart of slaves
- Regular master/slave setup.
- Each slave is in turn taken down and restarted.
- Checked that the slave state changes accordingly.
2017-12-19 16:59:25 +02:00
Markus Mäkelä
2e68ba8c6e Automatically detect the need for GTID replication
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.
2017-12-19 16:44:46 +02:00
Markus Mäkelä
70088be16d Use default value for "smoke"
The values should only be updated if the environment variable is defined.
2017-12-19 16:44:46 +02:00
Markus Mäkelä
a10b93515e Simplify initialization of replication
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.
2017-12-19 16:44:46 +02:00
Esa Korhonen
c3fe8a6b55 MXS-1565: Invalid rejoin test
- 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.
2017-12-19 15:59:01 +02:00
Esa Korhonen
2a9619dd07 Add fail/switch/rejoin info to release notes 2017-12-19 15:22:42 +02:00
Johan Wikman
34bb02062d Use execute_query instead of try_query when failure expected
try_query will log an error unnecessarily.
2017-12-19 15:06:59 +02:00
Markus Mäkelä
628203213e Fix template generation
The templates weren't generated for Galera nodes.
2017-12-19 15:00:39 +02:00
Markus Mäkelä
4451355e47 Don't force verbose output
The tests shouldn't force verbose output.
2017-12-19 15:00:39 +02:00
Johan Wikman
3e398004e8 Update 2.2 ChangeLog, Release notes, and Upgrading doc. 2017-12-19 13:58:15 +02:00
Johan Wikman
7813be0972 Update MaxScale 2.2 version number 2017-12-19 13:51:17 +02:00
Timofey Turenko
1006ec506a
2.2 fix restore (#152)
* 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
2017-12-18 23:47:07 +02:00
Timofey Turenko
1a63e5ec7e
2.1 fix restore (#151)
* refactor test backend fixing

* return comatibility with 5.5 for backend restore

* remove backend configuration scripts
2017-12-18 23:47:02 +02:00
Johan Wikman
b9e7eaf3aa Do not create std::string from NULL 2017-12-18 16:31:50 +02:00
Johan Wikman
5a612be394 Do not try to create a std::string from NULL 2017-12-18 16:25:41 +02:00
Johan Wikman
c4ba3ba4ca MXS-1561 Switchover to bad master
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.
2017-12-18 15:41:21 +02:00
Johan Wikman
033e3f628e MXS-1566 Rejoin old slave
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
2017-12-18 14:36:47 +02:00