13182 Commits

Author SHA1 Message Date
Niclas Antti
e331b7f432 Add a generic to_string() function. 2019-04-24 12:39:58 +03:00
Niclas Antti
8b7b7b4d3f Add a streamable class (Host) that represents an address and port,
or a unix domain socket.
2019-04-24 12:38:04 +03:00
Esa Korhonen
75c0ac5323 Move items from MonitorWorker to MonitorWorkerSimple
MonitorWorker only enforces the use of a worker thread but otherwise
does not define how the monitor is implemented.
2019-04-24 11:27:11 +03:00
Markus Mäkelä
2bc0b9c875
Don't ignore getcwd return value
The return value should be used.
2019-04-24 11:08:34 +03:00
Markus Mäkelä
4186f39616
Merge branch '2.3' into develop 2019-04-23 12:11:09 +03:00
Markus Mäkelä
9e3f0aab5a
Extract client address before allocating the DCB
By extracting the address before the session is started, we can refuse the
connection if there are too many connections from that particular host.
2019-04-23 11:57:10 +03:00
Markus Mäkelä
d60ec9e281
Fix test_config2
If the /etc/maxscale.modules.d/ didn't exist or wasn't accessable by the
current user, the test would fail.
2019-04-23 11:57:10 +03:00
Markus Mäkelä
5e6107d451
MXS-2441: Add galera with slaves test case
The test checks that servers replicating from Galera nodes work as
expected.
2019-04-23 11:57:10 +03:00
Markus Mäkelä
111ab8f5e4
MXS-2441: Document galeramon changes
Added a section that describes how galeramon behaves when it is configured
to monitor non-Galera servers that are replicating from Galera nodes.
2019-04-23 11:57:10 +03:00
Markus Mäkelä
60c1b15d60
MXS-2441: Add slave support to galeramon
Slaves that replicate from galeramon now get the Slave status if they are
replicating from a joined Galera node.
2019-04-23 11:57:10 +03:00
Markus Mäkelä
dda813f3aa
MXS-2441: Extend maxsql extraction functions
Having helper methods that combine the index position search and value
extraction make it easier to deal with results that have a lot of fields
e.g. the output of SHOW SLAVE STATUS.
2019-04-23 11:57:10 +03:00
Markus Mäkelä
ba79028a46
Add debug assertions into the core
The assertions make sure DCB writes and reads are only done by the thread
that owns them.
2019-04-23 11:46:38 +03:00
Johan Wikman
f41ce6db16 Update maintenance version for 2.3 2019-04-23 11:20:38 +03:00
Johan Wikman
a8639c3226 Merge branch '2.3.6' into 2.3 2019-04-23 11:20:09 +03:00
Johan Wikman
2d8a93e88d Update 2.3.6 release date 2019-04-23 11:17:01 +03:00
Markus Mäkelä
24fc82e160
Move large query processing inside RWBackend
The knowledge of which function to call can be internal to RWBackend. This
make the use of the class easier as one can simply write to the backend.
2019-04-18 13:58:34 +03:00
Markus Mäkelä
3e41a601f8
MXS-2411: Implicitly use latest API version
The request API prefix is now simply ignored as it has no meaning as long
as there is a single version of the API.
2019-04-18 13:58:34 +03:00
Markus Mäkelä
a471417150
MXS-1922: Show GTIDs for Galera nodes
Galera generates GTIDs even if they are unique across all nodes and it
makes sense to display this.
2019-04-18 12:04:56 +03:00
Johan Wikman
524a083203 MXS-2439 Do not classify implicit commits as commits
The type mask of CREATE, ALTER, etc. that cause an implicit commit
will no longer contain the bit QUERY_TYPE_COMMIT.

As an implicit commit does not change the transaction state as seen
by MaxScale, it does not make sense to claim that the statement is
a commit.
2019-04-18 11:19:23 +03:00
Niclas Antti
b9e6384a41 Adding streaming log macros. 2019-04-18 10:42:39 +03:00
Markus Mäkelä
03dc969cf2
Fix use-after-free in LocalClient
If the DCB was closed before the handshake for the LocalCliet connection
was received, the gw_decode_mysql_server_handshake would use the closed
DCB to log the connection ID. Clearing out the pointer prevents it.
2019-04-17 16:33:27 +03:00
Markus Mäkelä
3e04922565
MXS-2415: Fix client callbacks in arvorouter
The DCB callbacks shouldn't be used to send more events as they cause the
callback to be called recursively. The recursive calls caused rows to be
sent before the schemas for the rows were sent. Queuing the events via the
worker mechanism prevents this.
2019-04-17 16:07:05 +03:00
Markus Mäkelä
61f728c05a
MXS-2433: Reduce default query classifier cache size
Reduced the default cache size from 40% to 15%. Most cases don't benefit
from that much memory and the defaults have caused problems in live
environments.
2019-04-17 16:07:04 +03:00
Markus Mäkelä
d13e6e56ee
MXS-2433: Never cache multi-packet queries
If a query spans more than a single packet, it will never be successfully
classified due to the fact that the complete SQL is never available to the
query classifier. For this reason, it is pointless to cache them.
2019-04-17 16:07:04 +03:00
Markus Mäkelä
aca3d65bbb
MXS-2381: Add alter user
The `alter user` command makes password changes easier and keeps the usage
consistent across types in MaxScale.
2019-04-17 16:07:04 +03:00
Markus Mäkelä
733dc491d9
Integrate Replicator into avrorouter
Took the Replicator into use in avrorouter as an alternative to the
binlogrouter based setup. This also allows the avrorouter to automatically
handle master failovers and to start replication from GTID coordinates.
2019-04-17 14:13:44 +03:00
Markus Mäkelä
7723e7c933
Add modified Replicator for avrorouter
Repurposed the Replicator from the CDC integration project as a
replication event processing service. It is similar to the CDC version of
the Replicator and is still in the same namespace but it lacks all of the
cross-thread communication that was a part of the integration project.
2019-04-17 14:13:44 +03:00
Markus Mäkelä
363bb5aa56
Update Connector-C to 3.1
Updated the connector to 3.1 as it adds support for the replication
protocol.
2019-04-17 14:13:44 +03:00
Markus Mäkelä
b008c5a1e6
Add links to the sizes section
Links to the size type description in the documentation help explain what
sort of values are expected.
2019-04-17 14:10:48 +03:00
Markus Mäkelä
d77530a2a4
Use a known binlog name for Galera
The binlog files for Galera shouldn't rely on implicit naming simply due
to the fact that it logs a warning.
2019-04-17 13:32:21 +03:00
Markus Mäkelä
11814762b5
MXS-1662: Test PAM admin authentication
The test checks that the vagrant user has access to the REST API.
2019-04-17 13:24:59 +03:00
Esa Korhonen
64e282f74b Fix config of mysqlmon_multimaster_serverid 2019-04-17 11:26:38 +03:00
Markus Mäkelä
163b3a2da5
Fix unhandled promise rejection in create monitor
If a monitor was created with an argument that was not a key-value type, a
promise would be rejected outside of the main maxctrl function. Added a
test case that covers this and fixed a few other test coverage problems
that were present.
2019-04-17 11:17:33 +03:00
Markus Mäkelä
cba23781e0
Remove deprecated Galera options
The Galera installation warns that the two removed options are deprecated.
2019-04-17 11:17:33 +03:00
Markus Mäkelä
a4c6f3542a
MXS-2315: Tokenized CS version extraction
The STL regex implementations have proven to be unreliable on older
systems and replacing the regex with hand-written code for version
extraction is less prone to break.
2019-04-17 11:17:33 +03:00
Markus Mäkelä
fb785d1afc
Merge branch '2.3.6' into 2.3 2019-04-17 11:17:13 +03:00
Markus Mäkelä
665f0ddb89
Fix non_native_setup
The arguments must be passed as-is to the TestConnections constructor.
2019-04-17 11:16:16 +03:00
Markus Mäkelä
54cb6991d1
Wait for the monitor in mxs559_block_master
The test seems to fail from time to time due to the monitor not picking up
the master state fast enough. To prevent this, the test needs to wait for
at least one monitor interval.
2019-04-17 11:16:16 +03:00
Markus Mäkelä
d3bfe0a712
Fix handling of large result packets
The RWBackend didn't know to skip the tail end of large packets.
2019-04-17 11:16:16 +03:00
Johan Wikman
e9cc79d623 Fix typo in release notes 2019-04-17 09:31:49 +03:00
Esa Korhonen
067660e3e7 Merge branch '2.3' into develop 2019-04-16 16:55:12 +03:00
Esa Korhonen
2ca9337da1 Merge branch '2.2' into 2.3 2019-04-16 16:34:57 +03:00
Johan Wikman
8b29e70f63 MXS-2428 Allow fixed Clustrix configuration
If 'dynamic_node_detection' has been set to false, then the
Clustrix monitor will not dynamically figure out what nodes are
available, but instead use the bootstrap nodes as such.

With 'dynamic_node_detection' being false, the Clustrix monitor
will do no cluster checks, but simply ping the health port of
each server.
2019-04-16 13:58:27 +03:00
Johan Wikman
e09a6c8100 MXS-2428 Add 'dynamic_node_detection' 'health_check_port'
'dynamic_node_detection' specifies whether the Clustrix monitor
should dynamically figure out what nodes there are, or just rely
upon static information.

'health_check_port' specifies the port to be used when perforing
the health check ping.
2019-04-16 13:58:27 +03:00
Markus Mäkelä
df3950dbc0
MXS-2349: Amend create server documentation
The explanation for the socket behavior was missing.
2019-04-16 11:52:38 +03:00
Markus Mäkelä
2f243b8f08
MXS-2349: Document socket
Added documentation for the parameter and changed the minimum required
server definition in the REST API.
2019-04-16 11:52:38 +03:00
Markus Mäkelä
0cd00e888e
MXS-2349: Add socket support for maxctrl
A server can now be created with a socket.
2019-04-16 11:52:37 +03:00
Markus Mäkelä
ddf004b733
MXS-2349: Extend REST API tests
Added tests to the REST API that make sure the `socket` parameter works.
2019-04-16 11:52:37 +03:00
Markus Mäkelä
993334b9fd
MXS-2349: Add socket parameter
Servers now accept the `socket` parameter in the configuration as well as
in the REST API.
2019-04-16 11:52:37 +03:00
Markus Mäkelä
70450ce881
MXS-2349: Add support for UNIX domain sockets
Added core functionality for UNIX domain sockets in servers. Currently the
address parameter accepts them both but a separate `socket` parameter is
needed.
2019-04-16 11:52:37 +03:00