Johan Wikman
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
Markus Mäkelä
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
Johan Wikman
b2f44cefe7
MXS-2556 Don't crash if authenticator not found
2019-06-11 09:46:04 +03:00
Esa Korhonen
4efa9dbeea
Remove maxscale/alloc.h
...
The remaining contents were moved to maxbase/alloc.h.
2019-06-10 14:11:25 +03:00
Markus Mäkelä
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
Markus Mäkelä
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
Markus Mäkelä
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
Markus Mäkelä
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
Markus Mäkelä
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
Markus Mäkelä
cab336ed89
MXS-2483: Rename SSL_LISTENER to mxs::SSLContext
2019-05-20 15:45:18 +03:00
Esa Korhonen
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
Markus Mäkelä
50b5fe76ef
Pass parameters as const ref to server_alloc
2019-05-10 09:21:52 +03:00
Markus Mäkelä
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
Esa Korhonen
4e6ffc0381
Clean up server config parameter handling
...
Removes helper classes which are no longer required.
2019-05-07 15:39:34 +03:00
Markus Mäkelä
6b8ca35408
Format core source files
...
Formatted core .cc files according to current uncrustify configuration.
2019-05-06 16:05:50 +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
Johan Wikman
b1a495b342
MXS-2329 Use durations with persistmaxtime
2019-04-30 13:02:53 +03:00
Markus Mäkelä
6aedcc085f
Remove references to NDB server state
2019-04-24 14:15:56 +03:00
Markus Mäkelä
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
Markus Mäkelä
f6219d1a80
Fix persistent connection debug assertion
...
The assertion was done before the DCB was assigned.
2019-03-28 13:21:24 +02:00
Markus Mäkelä
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
Markus Mäkelä
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
Markus Mäkelä
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
Markus Mäkelä
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
Markus Mäkelä
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
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
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
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
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
Esa Korhonen
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
Esa Korhonen
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
Johan Wikman
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
Esa Korhonen
f1dcc4ac98
MXS-2304 Remove config_get_value()
...
Replaced with other functions.
2019-02-18 11:34:15 +02:00
Esa Korhonen
4b2c0b3edd
MXS-2304 Cleanup server_alloc()
...
Avoids using config_get_string().
2019-02-06 12:36:23 +02:00
Esa Korhonen
b357717149
MXS-2304 Use get_bool() instead of config_get_bool()
2019-02-01 17:18:49 +02:00
Esa Korhonen
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
Esa Korhonen
c8a84cebd0
MXS-2304 Use get_integer() instead of config_get_integer()
2019-01-31 18:12:25 +02:00
Johan Wikman
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
Johan Wikman
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
Esa Korhonen
6326172325
MXS-2271 Rename basic Monitor fields
...
Adds the m_-prefix.
2019-01-28 15:41:00 +02:00
Esa Korhonen
f559bf3d95
MXS-2271 Move disk space settings to a settings-container
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
b0663f0b29
Convert maxscale/ssl.h to .hh
2019-01-15 17:12:32 +02:00
Esa Korhonen
6d296f6661
MXS-2220 Move authenticator instance data to internal class
2019-01-11 11:31:27 +02:00
Esa Korhonen
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
Esa Korhonen
87913f8cb8
MXS-2220 Miscellaneous cleanup
...
Removes some duplicate includes.
2019-01-11 11:00:24 +02:00
Esa Korhonen
9cac927542
MXS-2220 Move server response calculation functions inside class
2019-01-10 10:26:53 +02:00
Esa Korhonen
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