Commit Graph

13128 Commits

Author SHA1 Message Date
da6d358f9f add systemd-dev package to the build env 2019-01-29 14:14:46 +02:00
aab7ab7dee add core dump configiration line to maxscale.service 2019-01-29 12:06:33 +02:00
fcd3a6a384 Remove erroneous whitespace from config files
Some whitespace was missed.
2019-01-29 11:18:41 +02:00
16fc920d33 MXS-2299: Hints always take precedence
Hints should override all statement level routing decisions that would
otherwise be done based on the query type.
2019-01-28 18:36:52 +02:00
6d88afbf55 MXS-2038: Fix debug assertion
A query that is classified as a write but has a hint that tells to route
it to a slave is not unexpected ever since the 2.1 version of MaxScale.
2019-01-28 18:36:52 +02:00
f335dba2c0 Fix stack buffer overflow in compare
The buffer was three characters short.
2019-01-28 17:35:27 +02:00
6326172325 MXS-2271 Rename basic Monitor fields
Adds the m_-prefix.
2019-01-28 15:41:00 +02:00
cef4e836bc MXS-2271 Store monitored servers in a vector
The array is still a public member because it's used in several non-member functions.
2019-01-28 15:41:00 +02:00
6322fd37bf Merge branch '2.2' into 2.3 2019-01-28 15:34:09 +02:00
9083ea2d02 MXS-2290 Reject use of whitespace in section names
Whitespace in section names was deprecated in 2.2 and in 2.4 it
will be rejected.
2019-01-28 12:22:28 +02:00
f78df53f30 MXS-2274 Add test
Check that use of reserved names (those starting with "@@") in
configuration file is rejected.
2019-01-28 12:22:28 +02:00
b078eb2cca Add server state to routing hint log message
If a server was not chosen as the target of a routing hint, the server
status would not be logged. By logging the server state in the message, it
is easier to figure out why a server wasn't chosen as the routing target.
2019-01-28 09:27:13 +02:00
2c95119a3b Replace STRTARGET macro
The macro was extremely unwieldly to update and made the addition of debug
assertions harder. Rewriting it as an inline function makes this possible.
2019-01-28 09:27:13 +02:00
546b80de4b MXS-2271 Move monitor interval to settings container 2019-01-25 13:46:01 +02:00
10dc0f53e0 MXS-2177 Move check_monitor_permissions() into class 2019-01-25 13:46:01 +02:00
ddaba28d78 Merge branch '2.3' into develop 2019-01-25 12:45:58 +02:00
9f1619f4da MXS-2225 Provide documentation regarding default max[admin|ctrl] user 2019-01-25 12:45:25 +02:00
92b27500c7 MXS-2276 Fix things due to MXS_MONITOR -> Monitor change 2019-01-25 10:30:27 +02:00
42b3402a71 MXS-2276 Use dynamic servers also for cluster check
Once the monitor has been able to connect to a clustrix node
and obtain the clustrix nodes, it'll primarily use those nodes
when looking for a Clustrix node to be used as the "hub".
With this change it is sufficient (but perhaps unwise) to provide
a single node boostrap node in the configuration file.

Some other rearrangements and renamings of functions has also been
made.
2019-01-25 10:30:27 +02:00
0fe5b0bec9 MXS-2276 Expose lower level mon_ping_or_connect_to_db
The functionality is useful also when you do not have a
MXS_MONITORED_SERVER instance.
2019-01-25 10:28:34 +02:00
5ebd237a4f MXS-2290 Replace whitespace is section names with -
Whitespace in section names have been deprecated since 2.2 and will
be rejected in 2.4. Consequently, the configuration files of the
system tests must be updated.
2019-01-24 17:45:10 +02:00
6937bb6663 MXS-2274 Create globally unique name for dynamic servers
Convention needs to be that the runtime object creating other objects
needs to incorporate its own name in the name of any object created.
Together with the '@@' prefix that ensures that the created name will
be reasonably globally unique.
2019-01-24 17:42:29 +02:00
7d92717b66 MXS-2274 Prevent dynamic creation of object with invalid name
Unfortunately there is not a single place where the name could be
validated, but it has to be done separately for each object type.
2019-01-24 17:42:29 +02:00
5afceb1185 MXS-2274 Reserve names starting with @@ for use by MaxScale
Names starting with '@@' can now longer be used in configuration files.
Subsequent commits will prevent such names from being used when objects
are created dynamically.
2019-01-24 17:42:29 +02:00
efb8dd9c06 Merge branch '2.3' into develop 2019-01-24 17:00:51 +02:00
0f26a8bed6 MXS-2112 Add system info to support info script 2019-01-24 16:52:47 +02:00
cdabee6f06 MXS-2269 Explain PAM anonymous group mapping 2019-01-24 16:48:07 +02:00
97c0c76321 MXS-2267 Document requirements for an accepted PAM user
The requirements are typical of MaxScale authenticators.
Also, fixes the fallback PAM service.
2019-01-24 16:44:34 +02:00
c061f45d52 Update links in example configuration
The links were out of date and pointed to 2.2.
2019-01-24 16:14:38 +02:00
f559bf3d95 MXS-2271 Move disk space settings to a settings-container 2019-01-24 09:49:53 +02:00
00594cc369 MXS-2271 Move global monitor list inside a local class
Cleans up list locking and handling.
2019-01-24 09:49:53 +02:00
f6cec41dd8 MXS-2271 Monitor config name and instance name are parameters of createInstance()
Also adds/moves some comments from previous entrypoints. Name and module
are now constant fields.
2019-01-24 09:49:53 +02:00
de970e579e Merge branch '2.3' into develop 2019-01-23 15:40:16 +02:00
09958afd61 Merge branch '2.3.3' into 2.3 2019-01-23 15:39:15 +02:00
9ac8bf93bb MXS-2271 Rename monitor-related classes
MXS_MONITOR->Monitor
MonitorInstance->MonitorWorker
MonitorInstanceSimple->MonitorWorkerSimple
2019-01-22 15:59:17 +02:00
465f9f16c4 MXS-2271 Remove unused monitor entrypoints 2019-01-22 15:59:17 +02:00
dadb6a1a79 MXS-2271 All monitors inherit from MXS_MONITOR
Most of the API entrypoints are replaced with virtual functions.
2019-01-22 15:59:17 +02:00
17fc2ba88a Store error status into QueryResult object
The QueryResult-object remembers if a conversion failed. This makes checking
for errors more convenient, as just one check per row is required. The conversion
functions always return a valid value.
2019-01-22 15:34:19 +02:00
3321a591ef MXS-2271 Move some monitor management functions to an internal class
The class MonitorManager contains monitor-related functions that should not
be called from modules. MonitorManager can access private fields and methods
of the monitor.
2019-01-22 10:31:06 +02:00
a7f0bcc4c5 MXS-2219 Close server connection if unusable
If a server cannot be used, close the associated MYSQL connection.
Further, when an existing connection is used, verify that the server
is still part of the quorum.
2019-01-21 15:41:55 +02:00
c51895eaad MXS-2219 Replace for_each with regular for loops
In this context the former provides no advantage.
2019-01-21 15:41:55 +02:00
01c3da9e0f MXS-2219 Check that monitored server is part of quorum
When the monitor connects to a Clustrix node, it checks that
the node is part of the quorum, before taking it into use.
2019-01-21 15:41:55 +02:00
6b556859ce MXS-2219 Use system.membership as primary table
From system.membership we can find out what server exist in the
cluster while system.nodeinfo contains information about those
servers. If a node goes down, it will disappear from system.nodeinfo,
but not from system.membership. Consequently, we must start from
system.membership and then fetch more information from system.nodeinfo.

Incidentally, a query like

    SELECT ms.nid, ni.iface_ip
    FROM system.membership AS ms
        LEFT JOIN system.nodeinfo AS ni ON ms.nid=ni.nodeid;

should provide all information in one go, but it seems that such joins
are not supported on the system tables.
2019-01-21 15:41:55 +02:00
f7c840df26 MXS-2219 Update datastructures instead of recreating them
The node infos of the Clustrix servers are now kept around and
and updated based upon changing conditions instead of regularly
being re-created.

Further, the server is now looked up by name only right after
having been created (and that only due to runtime_create_server()
currently being used).

The state of the dynamically created server is now updated directly
as a result of the health-check ping, while the state of the bootstrap
servers is updated during the tick()-call according to the monitor
"protocol".
2019-01-21 15:41:55 +02:00
0d1743c76b Merge branch '2.3' into develop 2019-01-21 14:07:47 +02:00
7fb80c530b Merge branch '2.3' into develop 2019-01-21 14:05:16 +02:00
f54d015267 Update 2.3 maintenance version 2019-01-21 13:43:53 +02:00
d350589ce1 Update 2.3.3 release date 2019-01-21 13:43:53 +02:00
5b7c63fef7 Fix quoted value skipping
The return value wasn't checked and the code assumed that a non-end
iterator was always returned.
2019-01-21 13:43:53 +02:00
9542641dae Fix buffer overrun on non-terminated comment
Also made the behavior consistent when an incomplete comment is found.
2019-01-21 13:43:53 +02:00