12782 Commits

Author SHA1 Message Date
Esa Korhonen
37db656cae Use correct service name and router module name
Both the base class and derived class had the fields, but the derived fields
were left blank.
2019-02-20 10:50:22 +02:00
Esa Korhonen
afe41c38ed Merge branch '2.3' into develop 2019-02-20 10:33:14 +02:00
Markus Mäkelä
c1d96d79f0
Document server port default value
The value has a default in 2.3.
2019-02-19 18:48:00 +02:00
Esa Korhonen
9fbaafea91 MXS-2304 Remove additional module parameter classes
Equivalent functionality is now in the basic config parameter class.
2019-02-19 13:52:44 +02:00
Esa Korhonen
48a6ab503e MXS-2292 PAM authenticator detects anonymous users with defined hosts
This allows anonymous user mapping from well-defined hosts.
2019-02-19 10:40:23 +02:00
Johan Wikman
bd3d5bb010 MXS-2329 Use durations in throttle filter 2019-02-19 10:11:57 +02:00
Johan Wikman
f3acf77a9f MXS-2329 Use durations in ccrfilter
The time window of the ccrfilter is now specified as a duration.
Internally, the time window is still always handled as seconds.
2019-02-19 10:11:57 +02:00
Johan Wikman
daf5c6b29c MXS-2332 When server is drained, report it as such
When the SERVER_BEING_DRAINED bit is on, if the number of connections
to the server is 0, the state is reported as "Drained", otherwise as
"Being Drained".
2019-02-19 10:06:37 +02:00
Esa Korhonen
f1dcc4ac98 MXS-2304 Remove config_get_value()
Replaced with other functions.
2019-02-18 11:34:15 +02:00
Esa Korhonen
f91a8813ea Reject "passwd" in monitor and service configs
Was deprecated in 2.3.
2019-02-18 11:34:15 +02:00
Esa Korhonen
35460923b1 Replace "passwd" with "password" in system test configs 2019-02-15 11:27:07 +02:00
Esa Korhonen
90e5b80b71 MXS-2050 Use global counter to detect log rotation request
Modules need to check the number regularly to detect a new log rotation.
2019-02-15 11:08:14 +02:00
Esa Korhonen
98a081f65b MXS-2050 Separate session log and shared log handling
Shared log file is accessed under a lock.
2019-02-15 11:08:14 +02:00
Esa Korhonen
25a53a649a MXS-2304 Remove config_get_param()
Replaced with other functions. Also removed password deprecation check.
2019-02-15 10:48:19 +02:00
Johan Wikman
1fd4ad64f6 MXS-2333 Add Clustrix monitor tutorial 2019-02-15 09:30:06 +02:00
Johan Wikman
21d9ec34cf MXS-2330 Use simpler queries
Since the current node id can be obtained using the function gtmnid()
the queries for finding out whether a node is in the quorum and whether
it is softfailed can be made simpler.
2019-02-15 08:09:03 +02:00
Johan Wikman
5c34550b40 MXS-2330 Do not use softfailed node as hub
When a softfailed node is finally revoked, it will appear as the
single node in a functioning Clustrix cluster. To ensure that the
Clustrix monitor will not stick to that node, if the node that is
used as hub is softfailed, it is immediately replaced with another
node.
2019-02-15 08:09:03 +02:00
Esa Korhonen
35e17d9878 Disable server config serialization test
The config parameter ordering depends on which end of the linked list the
parameters are added. The test should be re-enabled once parameter handling
has been refactored.
2019-02-14 15:39:37 +02:00
Johan Wikman
1fed465fdb MXS-2246 Remove duplicate info in SERVICE and Service
Both of them contained fields for the service and router names.
Now the names are in SERVICE and they must be accessed via member
function.
2019-02-14 15:24:10 +02:00
Johan Wikman
2528c5fa4d MXS-2253 Make Cache use the new duration config type
Internally the Cache used seconds, so some changes were needed.
2019-02-14 10:57:55 +02:00
Johan Wikman
c116452c25 MXS-2253 Add MXS_MODULE_PARAM_DURATION
Added a new module parameter type to be used for parameters
that specify a duration. With the suffixes 'h', 'm', 's' and
'ms' the duration can be specified in hours, minutes, seconds
or milliseconds, respectively.

Irrespective of how the duration is specified, it is always
returned as milliseconds.

For backward compatibility, when a duration value is read it must
be specifed how a value *not* defined using a suffix should be
interpreted; as seconds or milliseconds.

  value = param->get_duration(name, mxs::config::INTERPRET_AS_SECONDS);
2019-02-14 10:57:55 +02:00
Johan Wikman
a0d715a39f MXS-2253 Update general documentation regarding durations 2019-02-14 10:57:55 +02:00
Markus Mäkelä
49c6244245
Update MaxCtrl and REST API dependencies 2019-02-13 13:54:56 +02:00
Markus Mäkelä
12c22f0ba8
Merge branch '2.3' into develop 2019-02-13 13:37:50 +02:00
Markus Mäkelä
d44193bc9e
Merge branch '2.2' into 2.3 2019-02-13 13:37:42 +02:00
Markus Mäkelä
79fd01d4dd
Add hintfilter to documentation contents 2019-02-13 13:37:02 +02:00
Markus Mäkelä
9a12ae53f2
Merge branch '2.3' into develop 2019-02-13 13:35:07 +02:00
Markus Mäkelä
77dc5946c7
Fix watchdog test
The test needs to remove the expected core dump to prevent the test from
failing.
2019-02-13 13:34:48 +02:00
Markus Mäkelä
36e64aefe8
MXS-2326: Add hint cloning test case
The test checks that the steps taken to reproduce the bug no longer result
in a failure to route the query correctly.
2019-02-13 13:34:48 +02:00
Markus Mäkelä
775fc043c8
MXS-2326: Clone routing hints on gwbuf_clone
When a buffer is cloned the hints for that buffer should also be cloned.
2019-02-13 13:34:48 +02:00
Esa Korhonen
19143e04e1 Fix nested lists
Adding some spaces should fix rendering issues in KB.
2019-02-13 10:50:53 +02:00
Esa Korhonen
311704cdd9 MXS-2050 Clean up session log checking
Also moved constants around.
2019-02-13 10:36:36 +02:00
Esa Korhonen
c5763beb28 MXS-2050 Check session file rotation
Session log files are now regularly checked for existence. If the log file
does not exist (likely because it has been rotated), a new log file is created.
2019-02-13 10:36:36 +02:00
Esa Korhonen
16641a1f46 MXS-2050 Prepare to move file handling inside router sessions
The sessions will need to reopen the log file if it's rotated.
2019-02-13 10:36:36 +02:00
Johan Wikman
eac478876d Merge branch '2.3' into develop 2019-02-13 10:24:24 +02:00
Johan Wikman
6776392ffb Merge branch '2.3.4' into 2.3 2019-02-13 10:24:01 +02:00
Johan Wikman
e9667dd051 Update 2.3.4 release date 2019-02-13 10:14:41 +02:00
Johan Wikman
3b1b27fe9b Update maintenance version in 2.3 2019-02-13 10:11:36 +02:00
Esa Korhonen
cc06f98e42 MXS-2050 Move diagnostics and command handlers inside class 2019-02-11 14:17:43 +02:00
Markus Mäkelä
661f1dd4e4
Merge branch '2.3' into develop 2019-02-11 13:14:52 +02:00
Johan Wikman
7a99b5d253 MXS-2314 Define monitor state in terms of worker state
Worker::STOPPED    -> MONITOR_STATE_STOPPED
Worker::POLLING    -> MONITOR_STATE_RUNNING
Worker::PROCESSING -> MONITOR_STATE_RUNNING

By defining the monitor state from the worker state there is
no risk they will ever get out of sync. And there is one thing
less to maintain.
2019-02-11 13:03:18 +02:00
Johan Wikman
544e88a0b8 MXS-2314 Remove unnecessary monitor state 2019-02-11 13:03:18 +02:00
Johan Wikman
72d02d33c0 MXS-2314 Remove unnecessary worker states
The removed states were not used for anything useful.
2019-02-11 13:03:18 +02:00
Johan Wikman
6425d4ed0c MXS-2314 Ensure that connections are closed
As m_servers is a member of Monitor, it is better if the closing
of the MYSQL connections is done there, so that derived classes
do not need to remember doing that.
2019-02-11 13:03:18 +02:00
Johan Wikman
dffb933efa MXS-2314 Do not accept NULL when starting/stopping monitor 2019-02-11 13:03:18 +02:00
Johan Wikman
3646c118c9 MXS-2314 Move journal checking inside Monitor 2019-02-11 13:03:18 +02:00
Johan Wikman
cac1d76e48 MXS-2314 Monitor decides whether servers are added to services
When the servers of a service are defined by a monitor, then
at startup all servers of the monitor should be added to relevant
services. Likewise, when a server is added to or removed from a
monitor at runtime, those changes should affect services as well.

However, whether that should happen or not depends upon the monitor.
In the case of the Clustrix monitor this should not happen as it
adds and removes servers depending on the runtime state of the
Clustrix cluster.
2019-02-11 13:03:18 +02:00
Johan Wikman
ab93216064 MXS-2314 Server added to monitor should be added to service
If the servers of a service are defined by a monitor (the config
has 'cluster=SomeMonitor'), then the addition of a server to a
a monitor should lead to that server being added to the service.
2019-02-11 13:03:18 +02:00
Johan Wikman
0e3ec06c5b MXS-2314 Prevent removal of servers from clustered services
If the servers of a service are defined by a monitor, then it must
not be possible to dynamically add or remove servers from the
service.
2019-02-11 13:03:18 +02:00
Johan Wikman
b4eb87dfcc MXS-2314 Populate services with servers
The services whose servers are defined using a monitor, will
now be populated from the monitor.

Note, no consideration has yet been given to runtime changes.
2019-02-11 13:03:18 +02:00