55 Commits

Author SHA1 Message Date
Johan Wikman
d632c195ff 2.4.19 Update change date 2022-01-04 15:47:38 +02:00
Johan Wikman
2a54224927 2.4.18 Update change date 2021-10-29 08:29:51 +03:00
Johan Wikman
a8bfbbe254 2.4.17 Update change date 2021-03-08 09:03:02 +02:00
Johan Wikman
0224f24077 2.4.16 Update Change Date 2021-02-16 14:59:00 +02:00
Johan Wikman
c5bcf7a8b1 2.4.15 Update change date 2021-01-18 15:30:30 +02:00
Johan Wikman
df36ef86d0 2.4.14 Update Change Date 2020-11-16 14:23:26 +02:00
Johan Wikman
faaf7f483e 2.4.13 Update Change Date 2020-10-14 09:15:46 +03:00
Johan Wikman
babcda3eca 2.4.12 Update Change Date 2020-08-24 09:42:48 +03:00
Johan Wikman
fc9c9fcd77 2.4.11 Update change date 2020-07-07 10:01:38 +03:00
Johan Wikman
5ebae9be90 Merge branch '2.3' into 2.4 2020-06-05 09:36:24 +03:00
Johan Wikman
aa11c960b1 2.3.20 Update change date 2020-06-05 09:31:45 +03:00
Markus Mäkelä
d3d7054639
Merge branch '2.3' into 2.4 2020-04-24 16:09:20 +03:00
Johan Wikman
f527a8f2e6 2.3.19 Update Change Date 2020-04-23 14:23:57 +03:00
Johan Wikman
d0ab797938 Merge branch '2.3' into 2.4 2020-03-12 10:33:57 +02:00
Johan Wikman
e0cd6adb26 Update change date for 2.3.18 2020-03-10 10:45:47 +02:00
Johan Wikman
8b763fb88b Merge branch '2.3' into 2.4 2020-02-12 08:27:48 +02:00
Johan Wikman
cfb3f79b54 Update 2.3.17 Change Date 2020-02-10 15:28:38 +02:00
Johan Wikman
a7e0142224 Merge branch '2.3' into 2.4 2020-01-15 11:29:37 +02:00
Johan Wikman
790d90f229 Update 2.3.16 Change Date 2020-01-15 11:08:51 +02:00
Johan Wikman
a9a2b753c0 Update 2.4.5 change date 2019-12-18 13:25:03 +02:00
Johan Wikman
f6731a898d Update change date 2019-11-13 08:37:17 +02:00
Johan Wikman
fdfbf3e133 Update 2.4.3 change date 2019-11-05 12:21:00 +02:00
Johan Wikman
861e27eb00 Merge branch '2.3' into 2.4 2019-10-29 14:04:31 +02:00
Johan Wikman
df6c56e7ca Update 2.3.13 Change Date 2019-10-29 12:51:31 +02:00
Johan Wikman
0ba779d5a2 Update 2.4.0 Change Date 2019-06-25 10:11:55 +03:00
Markus Mäkelä
b4e8f79c5f
Format core sources again
Formatted with nl_func_type_name and related options set to ignore. This
keeps the formatting intact for long return types in declarations and
definitions.
2019-05-10 09:21:52 +03:00
Esa Korhonen
82b4338eca Remove MonitorManager calls from Monitor functions
Also adds admin thread checks to MonitorManager functions and combines
anonymous namespaces.
2019-04-30 13:45:48 +03:00
Esa Korhonen
fadbc0b1ae Separate Monitor management to its own file
Allows better separation of file local data. Also allows moving monitor-
related code from config_runtime.cc.
2019-04-25 12:32:41 +03:00
Markus Mäkelä
6aedcc085f
Remove references to NDB server state 2019-04-24 14:15:56 +03:00
Markus Mäkelä
906f0ed3cd
Add RAII class for stopping monitors
This way the state is encapsulated in the object and the required changes
are done in one place. This makes the code reusable across all functions
making it easier to implement better monitor alteration code.
2019-03-28 13:21:23 +02:00
Markus Mäkelä
03121c63d4
Add monitor reconfiguration helper
The MonitorManager function reconfigured a monitor and rolls back to the
old configuration if the new one doesn't work.
2019-03-26 17:30:38 +02:00
Markus Mäkelä
40df519be4
Never reactivate monitors
Reactivating monitors shouldn't be done as it's simpler to actually
destroy and create a new one. The performance of reactivation is
insignificant compared to the possible inconsistency problems it allows.
2019-03-21 18:19:10 +02:00
Esa Korhonen
14b4fa632a MXS-2271 Move Monitor inside maxscale-namespace
Rearranged monitor.cc by namespace.
2019-03-15 12:57:35 +02:00
Esa Korhonen
5e3f837b42 MXS-2271 Continue monitor header cleanup
No more free functions. Local functions moved to anonymous namespace.
2019-03-15 12:57:35 +02:00
Esa Korhonen
ac5ee1278c MXS-2271 Cleanup internal monitor header and its functions
Some functions still accessed the servers-array. Most functions are now
inside class. Removed unused defines.
2019-03-12 15:32:56 +02:00
Esa Korhonen
a8949b2560 MXS-2271 Move free monitor functions into classes
Functions are divided to MonitorManager, Monitor, or the monitored
server.
2019-03-12 10:29:55 +02:00
Esa Korhonen
1858fe9127 MXS-2271 Monitor modifications always go through Monitor::configure()
Previously, runtime monitor modifications could directly alter monitor fields,
which could leave the text-form parameters and reality out-of-sync. Also,
the configure-function was not called for the entire monitor-object, only the
module-implementation.

Now, all modifications go through the overridden configure-function, which calls the
base-class function. As most configuration changes are given in text-form, this
removes the need for specific setters. The only exceptions are the server add/remove
operations, which must modify the text-form serverlist.
2019-03-12 10:19:45 +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
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
Esa Korhonen
35ab911d5c MXS-2304 Use configuration class methods instead of separate implementations
Replaces parameter add/set/remove/free.
2019-02-07 13:51:16 +02:00
Esa Korhonen
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
Esa Korhonen
03411e825d MXS-2271 Move journal_max_age inside settings container 2019-01-31 17:05:35 +02:00
Esa Korhonen
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
Esa Korhonen
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
Esa Korhonen
546b80de4b MXS-2271 Move monitor interval to settings container 2019-01-25 13:46:01 +02:00
Esa Korhonen
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
Esa Korhonen
9ac8bf93bb MXS-2271 Rename monitor-related classes
MXS_MONITOR->Monitor
MonitorInstance->MonitorWorker
MonitorInstanceSimple->MonitorWorkerSimple
2019-01-22 15:59:17 +02:00
Esa Korhonen
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
Esa Korhonen
dd16a09342 MXS-2271 Move some initializers out of monitor_create() 2019-01-17 18:24:28 +02:00
Esa Korhonen
b15f43bc81 MXS-2205 Convert config_runtime.h and externcmd.h to .hh 2018-12-03 13:34:33 +02:00