ed80680da9
MXS-2304 Add ctor/dtor and other functions to parameter class
...
The manipulation functions are currently static so that the container can be initialized
if required. This will be fixed later.
The new functions are taken into use in monitor management.
2019-02-07 13:51:16 +02:00
934be45b68
MXS-2304 Remove config_get_string() and config_get_value_string()
...
Some functions accessing internal pointers still remain.
2019-02-06 12:58:59 +02:00
4b2c0b3edd
MXS-2304 Cleanup server_alloc()
...
Avoids using config_get_string().
2019-02-06 12:36:23 +02:00
78d9ef2910
MXS-2304 Remove remaining uses of config_get_string() from module code
...
The function returns a pointer to an internal string and should not be
used.
2019-02-06 12:36:23 +02:00
5ab7734e9d
MXS-2304 Add contains() to test if a parameter exists
...
Replaces uses of config_get_param() in modules either with contains()
or get_string(). The config_get_param() is moved to internal headers,
as it allows seeing inside a config setting.
2019-02-06 12:36:23 +02:00
b8be905b08
Merge branch '2.3' into develop
2019-02-06 12:24:09 +02:00
cf4724d128
MXS-2265: Fix formatting of the zero timestamp
...
The UNIX timestamp 0 should be treated as a special value and must be
interpreted as 0-00-00 00:00:00 instead of 1970-01-01 00:00:00.
2019-02-06 12:11:06 +02:00
4132c9bbbc
MXS-2304 Use get_c_str_copy instead of config_copy_string()
...
Also uses get_string() in core-code when appropriate.
2019-02-05 10:28:37 +02:00
3eb7d89c80
MXS-2304 Use get_service() and get_server()
2019-02-01 17:31:41 +02:00
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
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
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
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
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
a205c70374
MXS-2273 Allow the setting and clearing of BEING_DRAINED bit
...
Currently the bit is set so that is may be overwritten by the monitor
if the setting of the bit takes place while the monitor is performing
its monitor loop.
2019-01-30 12:16:57 +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
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
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
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
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
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
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
9ac8bf93bb
MXS-2271 Rename monitor-related classes
...
MXS_MONITOR->Monitor
MonitorInstance->MonitorWorker
MonitorInstanceSimple->MonitorWorkerSimple
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
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
0d1743c76b
Merge branch '2.3' into develop
2019-01-21 14:07:47 +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
7f978f275f
MXS-2223 Log a message when a slave is discriminated due to replication lag
...
Both the replication lag and the message printing state are saved in SERVER,
although the values are mostly used by readwritesplit. A log message is printed
both when a server goes over the limit and when it comes back below.
Because of concurrency issues, a message may be printed multiple times before
different threads detect the new message state.
Documentation updated to explain the change.
2019-01-21 13:02:18 +02:00