Commit Graph

202 Commits

Author SHA1 Message Date
861e27eb00 Merge branch '2.3' into 2.4 2019-10-29 14:04:31 +02:00
df6c56e7ca Update 2.3.13 Change Date 2019-10-29 12:51:31 +02:00
68f3b235e1 MXS-2650 Fix SSL-use with Connector-C
Authenticators and monitors now use SSL when configured. The fix has two parts:
1) Removed the extra SSLConfig inside SSLProvider, as SSLContext already contains
the config.
2) When inputting parameter values to mysql_ssl_set(), empty strings are converted
to NULL-pointers as the function expects those for unused values.
2019-08-29 17:46:26 +03:00
2238faa913 Make response time lock server-specific
There's no global data being modified inside the method call so a instance
level lock is sufficient.
2019-07-07 21:20:28 +03:00
0ba779d5a2 Update 2.4.0 Change Date 2019-06-25 10:11:55 +03:00
1fbb57f9b2 Check if socket server is MaxScale service
We need to handle the case that a MaxScale service is used as a
server over Unix domain sockets.
2019-06-20 11:05:00 +03:00
cd1b2e8748 Log server version when it changes
Knowing what the server version is can help rule out some
problems. Logging it whenever it changes also helps figure out when
upgrades took place.
2019-06-12 17:26:58 +03:00
b2f44cefe7 MXS-2556 Don't crash if authenticator not found 2019-06-11 09:46:04 +03:00
4efa9dbeea Remove maxscale/alloc.h
The remaining contents were moved to maxbase/alloc.h.
2019-06-10 14:11:25 +03:00
38b57497b9 MXS-2486: Move to_string into SSLProvider
The functionality is more a part of the provider than the context so it
should be defined in it. It also doesn't use any parts of the SSLContext
which makes it somewhat more clear that it doesn't belong there.
2019-05-28 14:34:50 +03:00
3af66f3309 MXS-2483: Take SSLProvider into use
Servers and listeners now have a SSLProvider member variable that is used
for all SSL related tasks.
2019-05-24 15:33:17 +03:00
4e2d350838 MXS-2483: Return std::unique_ptr from SSLContext::create
Smart pointers are far nicer than raw pointers.
2019-05-24 10:05:43 +03:00
3b8e28392e MXS-2483: Make server SSL private
The old server_ssl member is now renamed and private. The ssl_context and
set_ssl_context methods provide access to it.
2019-05-24 10:05:42 +03:00
82add11e86 MXS-2483: Take SSLContext into use
SSLContext is now used everywhere except the binlogrouter which still
allocates the contexts itself. Fixing the binlogrouter's misuse of
internal structures is a rather large undertaking and for this reason the
SSLContext will be taken into use there in a separate commit.
2019-05-20 15:45:18 +03:00
cab336ed89 MXS-2483: Rename SSL_LISTENER to mxs::SSLContext 2019-05-20 15:45:18 +03:00
a3bb61486d Move server_set_status and server_clear_status to monitor
The operation goes through monitor code so should be in the according file.
2019-05-10 14:37:35 +03:00
50b5fe76ef Pass parameters as const ref to server_alloc 2019-05-10 09:21:52 +03:00
3813c728b1 Move listener parameter handling into Listener::create
The Listener::create method now takes a set of configuration parameters
from which it constructs a listener. This removes the duplicated code and
makes the behavior of listener creation similar to other objects in
MaxScale. It also allows the configuration parameters to be stored in the
listener object itself.
2019-05-10 09:21:52 +03:00
4e6ffc0381 Clean up server config parameter handling
Removes helper classes which are no longer required.
2019-05-07 15:39:34 +03:00
6b8ca35408 Format core source files
Formatted core .cc files according to current uncrustify configuration.
2019-05-06 16:05:50 +03:00
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
b1a495b342 MXS-2329 Use durations with persistmaxtime 2019-04-30 13:02:53 +03:00
6aedcc085f Remove references to NDB server state 2019-04-24 14:15:56 +03:00
993334b9fd MXS-2349: Add socket parameter
Servers now accept the `socket` parameter in the configuration as well as
in the REST API.
2019-04-16 11:52:37 +03:00
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
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