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
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
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
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
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
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
dd16a09342
MXS-2271 Move some initializers out of monitor_create()
2019-01-17 18:24:28 +02:00
40f58ddec8
MXS-2271 Use std::mutex instead of pthread_mutex
2019-01-17 17:51:39 +02:00
3125d1babf
MXS-2271 Convert MXS_MONITOR and MXS_MONITORED_SERVER to classes
...
First step in monitor refactoring and cleanup.
2019-01-17 17:43:54 +02:00
f7d97825fb
MXS-2219 Add monitor_stash_current_status
...
The functions stores the current server status to the monitored
server's mon_prev_status and pending_status fields.
To be used at the start of the monitor loop, before the pending
status fields are updated.
2019-01-17 11:11:21 +02:00
1c647f3753
MXS-2220 Move most remaining functions inside class
...
Most of the ones still remaining outside are special cases.
Also, removed locking from status manipulation functions as it
has not been required for quite some time.
2019-01-08 15:15:34 +02:00
d5c78eb31f
MXS-2220 Move more server functions inside class
2019-01-08 15:12:47 +02:00
8b53e30678
MXS-2220 Move server status functions inside class
2019-01-08 15:12:47 +02:00
93aff0640c
MXS-2220 Cleanup server header
...
Moved items around in preparation for more changes.
2019-01-07 16:10:15 +02:00
764d9a4e75
MXS-2220 Move monitor user and password fields to internal class
...
Also changed the lengths of the buffers.
2019-01-07 16:10:15 +02:00
40485d746c
MXS-2220 Change server name to constant string
2019-01-03 12:13:15 +02:00
09aa54720d
MXS-2220 Read server version using public methods
...
Version related fields have been removed from the public class.
2019-01-03 11:23:14 +02:00
6209d737e9
MXS-2220 server_alloc returns internal type
...
Also adds default initializers to SERVER fields.
2018-12-14 10:31:57 +02:00
2b0eac2cd0
Move server disk space threshold setting to private Server-class
...
The setting can be read and written simultaneously and is protected with
a mutex.
The public SERVER-class is now abstract.
2018-12-14 10:18:14 +02:00
63e334d6c0
MXS-2220 mxs::server_status() accepts status flags
...
The overload is required to get rid of dummy SERVER objects.
2018-12-13 10:20:06 +02:00
8a8ac26e32
Cleanup monitor.hh
...
Also removes an unused field from several monitors.
2018-12-11 10:41:56 +02:00
e979a73cc0
Remove the STRSRVSTATUS macro
...
Use server_status() instead.
2018-12-10 15:55:07 +02:00
86574c16fb
Return std::string in server_status()
2018-12-10 15:55:07 +02:00
c0c9a9858d
MXS-2197 Rename maxscale/log.h to maxscale/log.hh
...
In files either include maxscale/log.hh or remove include entirelly
as maxscale/ccdefs.hh includes it.
2018-12-10 12:58:17 +02:00
bec9455a74
MXS-2205 Combine routingworker.h with routingworker.hh
2018-12-05 11:12:20 +02:00
3e5818fcb6
MXS-2205 Convert mysql_utils.h to .hh
2018-12-03 14:05:21 +02:00
36792607d8
MXS-2205 Combine internal/modules.h with internal/modules.hh
2018-12-03 13:36:25 +02:00
b15f43bc81
MXS-2205 Convert config_runtime.h and externcmd.h to .hh
2018-12-03 13:34:33 +02:00
00d0ec5f8e
Move wait_for_maxscale functionality inside MaxScale
...
By exposing a (currently undocumented) debug endpoint that lets one
monitor interval pass, we make the reuse of the monitor waiting
functionality a lot easier. With it, when MaxScale is started by the test
framework it knows that at least one monitor interval will have passed for
all monitors and that the system is ready to accept queries.
2018-11-09 09:13:27 +02:00
ecc7442358
Detect manual commands faster
...
Previous, MariaDBMonitor would wait until the next monitor interval before detecting
a new manual command. The commands are now checked every 100 ms.
2018-11-08 19:12:00 +02:00
fe3900be0e
MXS-2102 Allow runtime change of disk_space_threshold for monitor
...
This is currently disallowed for the server parameter, as the value could be
read/written concurrently. The monitor parameter can be changed since the
monitor is stopped during write.
2018-11-06 11:44:50 +02:00
906d8cee5b
Format all files
...
Formatted all files with uncrustify.
2018-10-31 09:46:02 +02:00
f518b38364
Initialize disk_space_checked
...
Was reading an uninitialized value.
2018-10-16 16:09:38 +03:00