12791 Commits

Author SHA1 Message Date
Markus Mäkelä
897fee715d
MXS-2302: Use const char* in hintfilter functions 2019-03-04 08:48:32 +02:00
Markus Mäkelä
11be8ed0f0
MXS-2302: Add comment extraction code
The code extracts comments from a query. All three comment types are
supported and the double dash comments properly handle invalid input
(fixes MXS-2289).

The code uses iterators to access to the query and returns a list of
iterator pairs as start and end markers to comments. This makes testing
easier as the input and output can be passed as an std::string.
2019-03-04 08:48:32 +02:00
Esa Korhonen
41a72bcc30 Fix config parameter related tests
The tests gave null arguments when a valid object was expected.
2019-02-25 17:10:00 +02:00
Esa Korhonen
2a63fb0776 MXS-2304 Store config parameter container as value in monitor and service 2019-02-22 16:53:17 +02:00
Esa Korhonen
3fa4a85a1e MXS-2304 Use values instead of pointers in CONFIG_CONTEXT
Simplifies ctor/dtor.
2019-02-22 16:39:45 +02:00
Esa Korhonen
5828c93112 MXS-2304 Convert static config parameter methods to non-static
Parameter handling changed in several places.
2019-02-22 15:17:55 +02:00
Esa Korhonen
b64e9b3ee0 MSX-2304 Store configuration parameters in a map
Also adds begin() and end() functions for loops.
2019-02-22 15:04:14 +02:00
Johan Wikman
a51f156372 Merge branch '2.3' into develop 2019-02-22 12:22:11 +02:00
Johan Wikman
675971bd3c MXS-2345 Query classifier collects db of USE stmt
qc_get_database_names() will now return the database used
in a USE statement.
2019-02-22 11:22:32 +02:00
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