12203 Commits

Author SHA1 Message Date
Esa Korhonen
ff22624d3c Add table of contents to router documentation
The TOC was added only to the long documentation files to make them easier
to navigate. Also modified the headings for Avro and Binlog routers and did
some minor cleanup.
2018-11-26 10:32:08 +02:00
Markus Mäkelä
e287e29ad0
Fix mxs1476 config
The parameter name was wrong.
2018-11-26 09:43:10 +02:00
Markus Mäkelä
cf6c48b015
Fix -Wshadow warnings
The cdc_connector.h won't built with -Wshadow if the variable and method
names match.
2018-11-26 09:42:12 +02:00
Markus Mäkelä
a042ad646b
MXS-2184: Fix avrorouter GTID generation
The event number in the GTID was not incremented for the update_after part
of the transaction.
2018-11-26 09:42:12 +02:00
Markus Mäkelä
842f9f1d15
Fix transaction replay timeout
The timeout would not be triggered due to the fact that the
delayed_retry_timeout wasn't inspected.
2018-11-26 09:42:12 +02:00
Markus Mäkelä
7bf5c07835
Ignore errors sent by servers in shutdown
When a server is stopping, it'll send an error to the client before
terminating the TCP connection. The code in readwritesplit would detect
this error and create a hangup event on the DCB. This would cause it to
appear as if the TCP connection was broken and the router would
immediately try to reconnect to the same server.

By ignoring the error and allowing the connection to die on its own, we
avoid immediately reconnecting and retrying any transactions on the
stopping server. This increases the chances that the monitor will see it
first and assign the server states correctly before the transaction replay
is attempted.
2018-11-26 09:42:12 +02:00
Markus Mäkelä
9f6700b329
Skip connection_keepalive during transaction_replay
When a transaction is replayed, there is no target but the routing was
"successful".
2018-11-26 09:42:11 +02:00
Markus Mäkelä
925670ae2f
Fix false master failure log message
The message would be logged even if the session continues.
2018-11-26 09:42:11 +02:00
Markus Mäkelä
8b92c63248
Remove incorrect assertion
The assertion would hold true for a single worker but it can't be
guaranteed to be true on a multi-worker system where the statistics are
distributed across the workers.
2018-11-26 09:42:11 +02:00
Markus Mäkelä
dcf53da209
Enable connection_keepalive by default
Enabling the feature by default prevents the master connection from dying
during times when there are very little or no writes. Having a modest ping
interval of 300 seconds serves to minimize the amount of extra work that
both MaxScale and the server have to do while still keeping the
connections in good shape.
2018-11-26 09:42:11 +02:00
Esa Korhonen
b47d4a4105 Use max_statement_time
Used only with supporting server versions. Using the time limit ensures that
the server interrupts the query at the same point Connector-C would cut the
connection. This prevents lingering queries.

Also, cleans up some associated error messages.
2018-11-23 15:15:44 +02:00
Esa Korhonen
0a5a3309e0 Add missing quotes when printing server names
Some of the log messages didn't have the quotes.
2018-11-23 14:02:09 +02:00
Markus Mäkelä
75fb728ee7
Don't require libsystemd for system tests
The tests don't require it to compile.
2018-11-23 08:47:04 +02:00
Markus Mäkelä
1bba689c80
Make the error message a const char* const
This prevents linker errors if the source files are used directly.
2018-11-22 14:51:03 +02:00
Markus Mäkelä
ba5017bdff
Merge branch '2.2' into 2.3 2018-11-22 13:55:17 +02:00
Markus Mäkelä
de49797014
Rewrite bug561.sh in C++
Rewrote the bug561.sh test as the error_messages test that covers what was
tested by the script as well as some new parts that were untested. This
revealed a bug in the error messages where MaxScale always returns the
database name in the error.
2018-11-22 13:51:08 +02:00
Markus Mäkelä
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
Markus Mäkelä
cb67d4cee3
Log instructions for bypassing test dependency checks
If not all test programs are installed, instructions on how to bypass them
are logged. This allows testing without installing all of the packages.
2018-11-22 13:51:08 +02:00
Markus Mäkelä
2ff95216a9
MXS-2081: Prevent unwanted stripping of binaries
RPM packages by default strip all executables on some systems after
installation. To work around this, the post install part needs to be
prevented. This does not mean the post-install scripts used to create the
directories required by MaxScale.
2018-11-22 13:38:35 +02:00
Esa Korhonen
816e45ccb9 Add multimaster test with 'assume_unique_hostnames' disabled
Uses the same test code, just changes the config file. This test is currently
the only one in which the setting is disabled.
2018-11-22 12:17:45 +02:00
Esa Korhonen
fb52e565fe Store capabilities of monitored server
Checking the version number in various places in the code gets confusing.
It's better to check the version in one place and record the relevant data.
2018-11-21 17:36:52 +02:00
Esa Korhonen
01628dd0de Cleanup server version updating 2018-11-21 17:36:52 +02:00
Esa Korhonen
0916b58c7e Merge branch '2.2' into 2.3 2018-11-21 16:46:06 +02:00
Johan Wikman
dd27fe0c04 Enable the watchdog
As the watchdog related problems have now been dealt with, it is
safe to have it enabled by default.
2018-11-21 15:33:14 +02:00
Timofey Turenko
7777732f19 remove tabs and spaces from set_env.sh 2018-11-21 13:53:50 +02:00
Johan Wikman
1591ff7f46 MXS-2179 Activate WD workaround when fetching users
Fetching the users may potentially take longer than the watchdog
timeout. To ensure that MaxScale is not killed by systemd, we must
ensure that the notifications are generated also when MaxScale
synchronously is fetching the users.
2018-11-21 13:47:04 +02:00
Timofey Turenko
b44ea837b9 do not use ssh to check MariaDB server start command
maxscale-system-test/set_env.sh script is slow because it checks if MariaDB start command is mysql or mysqld
Now all versions can be started with 'mysql' except MySQL 5.5 which is not supported
2018-11-21 13:39:01 +02:00
Johan Wikman
f1a113aff0 MXS-2178 Reduce accessbility of workarounds
Some rearrangements to ensure that what should be private
can be kept private.

- WatchdogNotifier made a friend.
- WatchdogWorkaround defined in RoutingWorker and made a friend.
- mxs::WatchdogWorker defined with 'using'.
2018-11-21 13:31:49 +02:00
Johan Wikman
78829429ae MXS-2178 Add WD workaround to REST-API and maxadmin 2018-11-21 13:31:49 +02:00
Johan Wikman
be12cab16d MXS-2178: Provide workaround for watchdog notifications
The systemd watchdog mechanism requries notifications at
regular intervals. If a synchronous operation of some kind
is performed by a worker, then those notfications will not
be generated.

This change provides each worker with a secondary thread that
can be used for triggering those notifications when the worker
itself is busy doing other stuff. The effect is that there will
be an additional thread for each worker, but most of the time
that thread will be idle.

Sofar only the mechanism; in subsequent changes the mechanism
will be taken into use.
2018-11-21 13:31:49 +02:00
Niclas Antti
923be73636 MXS-2171 Refuse to build without libsystemd-dev on systems that have systemd 2018-11-21 12:42:49 +02:00
Esa Korhonen
5d4775cac1 MXS-2168 Update test_cycle_find
The test now uses both server id:s and hostname:port combinations.
2018-11-21 10:40:21 +02:00
Esa Korhonen
c61aaee0ba MXS-2168 Add documentation on "assume_unique_hostnames" 2018-11-21 10:30:11 +02:00
Esa Korhonen
90da3a4d90 Remove MXS_MONITORED_SERVER mapping from MariaDBMon
The mapping was rarely used.
2018-11-21 10:30:11 +02:00
Esa Korhonen
1a046bd453 MXS-2168 Add 'assume_unique_hostnames'-setting to MariaDBMonitor
Adds the setting and takes it into use during replication graph creation
and the most important checks.
2018-11-21 10:30:11 +02:00
Johan Wikman
64a9a5135e Update maintenance version 2018-11-20 19:29:42 +02:00
Johan Wikman
d06d919752 Merge branch '2.3.1' into 2.3 2018-11-20 19:28:18 +02:00
Johan Wikman
ad7c5dd981 Update release date 2018-11-20 19:25:56 +02:00
Markus Mäkelä
fa65881f13
Add explicit installation instructions
The packages need to be installed with the correct tools and thus it makes
sense to instruct on the installation in the installation guide.
2018-11-20 16:28:36 +02:00
Esa Korhonen
45eee098d1 MXS-2158 Add test case for rejoining a server with no gtid 2018-11-20 11:28:29 +02:00
Johan Wikman
48eb57bdc5 Merge branch '2.3.1' into 2.3 2018-11-20 11:27:59 +02:00
Markus Mäkelä
c552845fd1
Deprecate old admin modules
Added notification messages for the deprecation of the old admin interface
modules. Also added notes into the documentation about their deprecation.
2018-11-20 10:51:49 +02:00
Johan Wikman
e3ad827288 Do not enable the watchdog by default
Any administrative operation, performed using maxadmin or maxctrl,
that takes longer than the watchdog timeout will cause MaxScale to
be killed and restarted by the watchdog.
2018-11-20 10:43:59 +02:00
Markus Mäkelä
87e350f171
Remove hard-coded server_id from mysqlmon_failover_stress
Dynamically probing the server_id prevents the test from failing if the
server configuration is changed.
2018-11-19 20:19:21 +02:00
Markus Mäkelä
41670875fc
MXS-2146: Add csmon test case
Added a test case that does a set of sanity checks on the monitor. As the
monitor is very simple, there are not a lot of things to test without
access to the actual instances (e.g. ExeMgr failures need to be tested).

Currently the test always passes as ColumnStore clusters aren't
implemented for the test framework.
2018-11-19 20:19:21 +02:00
Markus Mäkelä
da1772f8c9
MXS-2146: Add conditional columnstore usage
Tests can now declare that they require a columnstore setup. If one is not
present, the test is skipped.
2018-11-19 20:19:18 +02:00
Markus Mäkelä
92b4ed2867
Use explicit paths for bad config location
The test_bad_config used implicit locations which aren't very clear. Using
an explicit path, /tmp/, solves all of these problems.
2018-11-19 20:03:22 +02:00
Markus Mäkelä
778623bdfd
Make mysqlmon_failover_manual2 tests faster
Removed the sleeps and used wait_for_monitor instead. Also dropped the
table at the end of the test.
2018-11-19 20:03:22 +02:00
Markus Mäkelä
fd3a42ceb6
Remove unnecessary sleeps from tests
Removed unnecessary sleeps and replaced sleeps with wait_for_monitor in
some older tests. Also removed the odd arrangement of arrays in
server_weight.
2018-11-19 20:02:13 +02:00
Markus Mäkelä
47092ed18a
Prevent connection double counts in tests
The function would count a connection twice if hostname resolution was not
enabled and both the host and the IP matched.
2018-11-19 20:02:13 +02:00