Commit Graph

12884 Commits

Author SHA1 Message Date
882d360355 MXS-2304 Use get_size() instead of config_get_size() 2019-02-01 17:23:14 +02:00
b357717149 MXS-2304 Use get_bool() instead of config_get_bool() 2019-02-01 17:18:49 +02:00
7cb969b0d9 MXS-2271 Clean up server list parsing functions, use in monitor config
The functions now return the parsed array.
2019-02-01 14:59:51 +02:00
6038f1f386 Merge branch '2.3' into develop 2019-02-01 13:55:54 +02:00
08dd55a26a Use -ftls-model=initial-exec with maxscale-common
Resolving the relocations right at startup reduces the cost of using
thread-local variables.
2019-02-01 13:20:44 +02:00
968743f61a Fix compiler errors related to unused results 2019-02-01 12:31:53 +02:00
0ee63578d0 MXS-2275 Fix typo in documentation 2019-02-01 11:04:38 +02:00
b582119d27 MXS-2275 Check for softfailed nodes
When checking the node info, also include information about wheter
a node is being SOFTFAILed. If it is, turn on the `Being Drained`
bit.

A node is SOFTFAILed with the intention of removing it, so better
not to create new connections to it as they later would be broken
when the node is actually taken down.
2019-02-01 11:00:53 +02:00
55b1e031d6 MXS-2275 Fix breakage due to rebasing 2019-02-01 11:00:53 +02:00
6d60714a17 MXS-2275 Always log monitor instance name
When logging something, always log the monitor instance name
as well.
2019-02-01 11:00:53 +02:00
cb07687672 MXS-2275 Implement [un]softfailing
It is now possible to [un]softfail a Clustrix node via MaxScale
using a Clustrix monitor module command.

In case a node is successfully softfailed, the `Being Drained` bit
will automatically turned on. Similarly, if a node is successfully
unsoftfailed, the `Being Drained` bit will be cleared.
2019-02-01 11:00:53 +02:00
2e395c4477 MXS-2275 Add skeleton softfail/unsoftfail support
Add skeleton implementation for the functionality for being able
to softfail and unsoftfail a Clustrix node.
2019-02-01 11:00:53 +02:00
944ee3d977 MXS-2223 Test delayed slave logging
The test now checks that the log contains related messages.
2019-02-01 10:41:16 +02:00
f2d2202ea3 MXS-2304 Use get_enum() instead of config_get_enum() 2019-02-01 10:29:24 +02:00
c8a84cebd0 MXS-2304 Use get_integer() instead of config_get_integer() 2019-01-31 18:12:25 +02:00
63b5eab89e MXS-2304 Convert configuration management structs to classes
The fields of MXS_CONFIG_PARAMETER remain unchanged so that parameter
processing can be changed gradually.
2019-01-31 17:57:16 +02:00
03411e825d MXS-2271 Move journal_max_age inside settings container 2019-01-31 17:05:35 +02:00
ce9b49d8d5 MXS-2271 Move script-related settings to the settings-container
Also moves related functions to class methods.
2019-01-31 17:05:34 +02:00
0903648542 MXS-2271 Move connection settings inside settings struct
Since the settings are now protected fields, all related functions were
moved inside the monitor class. mon_ping_or_connect_to_db() is now a method
of MXS_MONITORED_SERVER. The connection settings class is defined inside the
server since that is the class actually using the settings.
2019-01-31 17:00:47 +02:00
4ee0e9364e MXB_MODULE_NAME must be defined before maxbase/log.h is included
Otherwise MXB_MODULE_NAME will be NULL.
2019-01-31 15:23:32 +02:00
3074e7e6bb MXS-2308: Fix connector_plugindir
The default values now point to the location where the connectors plugins
are installed.
2019-01-31 14:23:27 +02:00
b0c2dc78af MXS-2305: Show Linux users in list users
The linux users were missing from the `list users` output.
2019-01-31 14:23:27 +02:00
3f4c72d4f2 MXS-2303: Fix missing parameter error
The detection of missing parameters that define which module to load must
be done before the module is loaded.
2019-01-31 14:23:27 +02:00
6ab3985164 Auto-generate ToC
The KB supports the [TOC] tag that auto-generates the table of contents.
2019-01-31 14:23:27 +02:00
f476266637 Increase number of monitor waits in mxs1507_trx_replay
The test appears to have failed at least once when the monitor did not,
for some reason, notice that a server was down. Also adjusted the queries
to be more unique across the test cases.
2019-01-31 14:23:27 +02:00
840b4b24bd MXS-2300: Fix off-by-one bug in history size
The history was one command shorter than what was configured.
2019-01-31 14:23:27 +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
260ce9b8b8 MXS-2300: Add session command pruning
This commit adds a new parameter that, when enabled, prunes the session
command history to a known length. This makes it possible to keep a
client-side pooled connection open indefinitely at the cost of making
reconnections theoretically unsafe. In practice the maximum history length
can be set to a value that encompasses a single session using the pooled
connection with no risk to session state integrity. The default history
length of 50 commands is quite likely to be adequate for the majority of
use-cases.
2019-01-31 14:23:26 +02:00
bf4aa1ab2c MXS-2295: Keep the COM_CHANGE_USER command
If the whole session command history is cleared, the COM_CHANGE_USER is
lost and the connections can end up using different users.
2019-01-31 14:23:26 +02:00
f39f27cd7b MXS-2295: Session command loop test case
Test executes various session commands in a loop and makes sure a
COM_CHANGE_USER resets the history.
2019-01-31 14:23:26 +02:00
2e809524d1 MXS-2295: Reset session commands on connection reset
When the connection state is reset by executing a COM_CHANGE_USER or
COM_RESET_CONNECTION, readwritesplit does not need to store the session
command history that was executed before it. With this, pooled connections
will effectively behave like normal connections if the pooling mechanism
is smart enough to reset the connection. This also prevents unwanted
visibility into the session states of other connections.
2019-01-31 14:23:26 +02:00
24c9b62a2f Add verbose logging for session command failures
If the routing of a session command fails due to problems with the backend
connections, a more verbose error message is logged. The added status
information in the Backend class makes tracking the original cause of the
problem a lot easier due to knowing where, when and why the connection was
closed.
2019-01-31 14:23:26 +02:00
df9335382d Fix qc cache memory usage message
A zero value would get printed as -nanYiB.
2019-01-31 14:23:16 +02:00
da07672778 Fix query_classifier_cache_size
The query_classifier_cache_size was placed in the wrong section.
2019-01-31 14:23:16 +02:00
a9f6955fc8 Revert "add systemd-dev package to the build env"
This reverts commit da6d358f9fee7cb7302f082f179c45f581e681d3.
2019-01-31 14:07:52 +02:00
abaa228987 Add extra definitions to debug build service files
The unlimited core dumps are now only enabled for debug builds.
2019-01-31 13:14:46 +02:00
b18467e17e Add direct mode to Worker::execute()
Sometimes that's what you want, but primarily for completeness'
sake and it makes AUTO more sensical as it essentially chooses
beteen DIRECT and QUEUED mode.
2019-01-31 10:04:55 +02:00
f0abe9cbdc add /bin/sh before prlimit command in service start 2019-01-30 23:31:45 +02:00
45f85a2740 add prlimit command to service start 2019-01-30 18:45:24 +02:00
556ea552aa MXS-2273 Add system test 2019-01-30 13:04:32 +02:00
8204b7d875 MXS-2273 Fix issues related to changes in Monitor 2019-01-30 12:38:36 +02:00
b650dd4f67 MXS-2273 Drop unnecessary SERVER prefix in names
MXS_MONITORED_SERVER provides enough scope.
2019-01-30 12:16:57 +02:00
bc4a52acb0 MXS-2273 Set SERVER_BEING_DRAINED properly
The maintenance and being-drained modes are now set using the same
mechanism.
2019-01-30 12:16:57 +02:00
e3d74bd18d MXS-2273 Generalise names
The maintenance flag and being-drain flags will be turned on using
the same variable, so the variable and constant names needs to be
generalized.
2019-01-30 12:16:57 +02:00
159d9ccba9 MXS-2273 Move constants to more appropriate locations
Constants now used in the context of MXS_MONITORED_SERVER or
Monitor are now moved from SERVER to MXS_MONITORED_SERVER or
Monitor, respectively.
2019-01-30 12:16:57 +02:00
57a94b417d MXS-2273 Move maint_request from SERVER to MXS_MONITORED_SERVER
The _request_ for setting the status of a server relates to the
monitor and its MXS_MONITORED_SERVER, not to the SERVER itself.
2019-01-30 12:16:57 +02:00
727d3feb3b MXS-2273 Move code for setting maintenance bit to monitor.cc
Applies to being-drained as well.

Better that this special handling is handled by Monitor that needs it.
2019-01-30 12:16:57 +02:00
05b650ed91 MXS-2273 Update release notes regarding draining
TODO: This much explanation in the release notes is a bit too
much, the beef should be moved somewhere else and the release
notes simply refer to that.
2019-01-30 12:16:57 +02:00
8e59f4efbd MXS-2273 A master is a master even if it is not connectible
When looking for a master, if it does exist it should be found
even if it is not connectible. The fact that it is not connectible
should be dealt with when a connection is created.
2019-01-30 12:16:57 +02:00
117f89a409 MXS-2273 Deal with master being drained at RWS connect
If a master is found but it is being drained, the connection attempt
is rejected if the master failure mode is fail_instantly.

In that case the logged message makes it plain that it is the draining
that is the reason for the connection attempt to fail.
2019-01-30 12:16:57 +02:00