Commit Graph

177 Commits

Author SHA1 Message Date
f6219d1a80 Fix persistent connection debug assertion
The assertion was done before the DCB was assigned.
2019-03-28 13:21:24 +02:00
858327acf7 Rename Being Drained to Draining
With this, the words are unique and can be searched for more easily. This
does not fix the test failure of mxs2273_being_drained.
2019-03-28 13:21:24 +02:00
203bba0e1d Add support for multiple runtime error messages
Storing all the runtime errors makes it possible to return all of them
them via the REST API. MaxAdmin will still only show the latest error but
MaxCtrl will now show all errors if more than one error occurs.
2019-03-21 18:19:10 +02:00
3eef2648e1 MXS-2313: Expose only two rank values
The rank can now only be used to define two groups of servers: primary and
secondary servers. This limits the exposure and reduces the number of
possibilities that can arise from the use of this parameter thus making it
more predictable.
2019-03-18 13:12:59 +02:00
9b6b5270f1 MXS-2313: Use 64-bit integers to store rank
Although the default value is the maximum value of a signed 32-bit
integer, the value is stored as a 64-bit integer. The integer type
conversion functions return 64-bit values so storing it as one makes
sense.

Currently values higher than the default are allowed but the accepted
range of input should be restricted in the future.
2019-03-18 13:12:58 +02:00
0693514047 MXS-2313: Add server ranks
The servers now accept a rank parameter that tells which servers to
prioritize.
2019-03-18 13:10:23 +02:00
14b4fa632a MXS-2271 Move Monitor inside maxscale-namespace
Rearranged monitor.cc by namespace.
2019-03-15 12:57:35 +02:00
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
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
e7abc53b70 MXS-2304 Clean up configuration serialization
The parameters are now written in the order they appear in the module
parameter definitions. Also enabled a previously disabled part in
server unit test.
2019-03-12 12:51:23 +02:00
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
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
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
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
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
f1dcc4ac98 MXS-2304 Remove config_get_value()
Replaced with other functions.
2019-02-18 11:34:15 +02:00
4b2c0b3edd MXS-2304 Cleanup server_alloc()
Avoids using config_get_string().
2019-02-06 12:36:23 +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
c8a84cebd0 MXS-2304 Use get_integer() instead of config_get_integer() 2019-01-31 18:12:25 +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
6326172325 MXS-2271 Rename basic Monitor fields
Adds the m_-prefix.
2019-01-28 15:41:00 +02:00
f559bf3d95 MXS-2271 Move disk space settings to a settings-container 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
b0663f0b29 Convert maxscale/ssl.h to .hh 2019-01-15 17:12:32 +02:00
6d296f6661 MXS-2220 Move authenticator instance data to internal class 2019-01-11 11:31:27 +02:00
42215c65fa MXS-2220 Cleanup global server list handling
The list is now an array and only accessed by the owning object to ensure locking.
2019-01-11 11:31:27 +02:00
87913f8cb8 MXS-2220 Miscellaneous cleanup
Removes some duplicate includes.
2019-01-11 11:00:24 +02:00
9cac927542 MXS-2220 Move server response calculation functions inside class 2019-01-10 10:26:53 +02:00
df17619722 MXS-2220 Move server_update_address inside class
Should be moved to internal class once blr is cleaned up.
2019-01-10 10:26:53 +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
b16ee3a94e MXS-2220 Move server_is_active inside the class 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
ca9c52944b MXS-2220 Use std::string for protocol and authenticator fields 2019-01-03 12:13:15 +02:00
40485d746c MXS-2220 Change server name to constant string 2019-01-03 12:13:15 +02:00
5fc2c1f49c MXS-2220 Store server ports as integers and modify them in methods 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
d1b098d3b0 MXS-2200 Store server version string and type in internal class 2019-01-02 12:53:52 +02:00
6206abde3e Update Server version in server_set_version
The new method was not called by the old function.
2018-12-27 14:44:13 +02:00
eacf88f6a5 MXS-2220 Add server version and type information struct
The old fields are still used.
2018-12-19 13:18:16 +02:00
c8fc956b7b MXS-2220 Combine anonymous namespaces
Also clean up file local variables.
2018-12-18 12:34:51 +02:00
569c66fa28 MXS-2220 Store server parameters in stl containers
The custom parameters are now protected from concurrent access.
2018-12-18 12:34:06 +02:00
31ceee6d22 MXS-2220 Move persistent DCB settings and handling to the private Server-class 2018-12-18 12:14:44 +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
3f81a37e70 MXS-2220 Move rest of dcb printing functions to private class 2018-12-14 10:18:14 +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