Commit Graph

268 Commits

Author SHA1 Message Date
8b763fb88b Merge branch '2.3' into 2.4 2020-02-12 08:27:48 +02:00
cfb3f79b54 Update 2.3.17 Change Date 2020-02-10 15:28:38 +02:00
4a725da940 Merge branch '2.3' into 2.4 2020-01-31 12:27:50 +02:00
f6d848d58c MXS-2859: Treat newlines in strings as errors
Allowing raw newlines in string values breaks configuration serialization.
2020-01-30 10:44:00 +02:00
aa84c4dc7e MXS-2821: Improve REST API errors
The error message now states what the real reason of the error was.
2020-01-21 09:18:32 +02:00
a7e0142224 Merge branch '2.3' into 2.4 2020-01-15 11:29:37 +02:00
790d90f229 Update 2.3.16 Change Date 2020-01-15 11:08:51 +02:00
a9a2b753c0 Update 2.4.5 change date 2019-12-18 13:25:03 +02:00
ab8393939b MXS-2773: Make host blocking an optional feature
In cases where servers are known to be down on startup, this feature does
more harm than good. Disabling it in these cases would be preferable but
due to how the parameter is used, it is not possible.
2019-11-29 16:31:07 +02:00
f6731a898d Update change date 2019-11-13 08:37:17 +02:00
fdfbf3e133 Update 2.4.3 change date 2019-11-05 12:21:00 +02:00
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
64d19cf018 MXS-2711: Fix updating of retain_last_statements
The value is now correctly expected to be a non-negative integer.
2019-10-04 09:42:03 +03:00
31029eaec8 MXS-2675: Fix server creation with TLS via REST API
The TLS parameters were defined but the main parameter that enables it
wasn't automatically added. As the REST API documentation states that this
parameter does not need to be defined, the runtime configuration must add
it.
2019-09-13 14:14:34 +03:00
8ce6a679be Merge branch '2.3' into 2.4 2019-08-09 19:44:46 +03:00
5899556d89 MXS-2592 Enable runtime configuration of session_trace 2019-08-09 19:36:24 +03:00
0ba779d5a2 Update 2.4.0 Change Date 2019-06-25 10:11:55 +03:00
aac0ecc373 MXS-2574: Add PATCH for /users/inet endpoint
The alteration of user passwords is now done inside MaxScale. This
prevents the possibility of a user locking themselves out.
2019-06-25 08:23:17 +03:00
21cdc4822b MXS-2483: Remove runtime enabling of TLS
TLS can no longer be enabled at runtime via maxadmin.
2019-05-28 14:34:50 +03:00
9443e99a17 MXS-2483: Separate JSON server creation from legacy code
The servers created via the REST API now use code separate from the
maxadmin interface. This removes the cumbersome requirement of having to
first create the server and then configure it. With this change, it is
possible to completely remove the ability to set the server SSL after
creation.
2019-05-28 14:34:50 +03:00
0e88aac497 Fix extract_parameters_from_json
The function would only work for string parameters.
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
bc500d2565 MXS-2483: Store server SSLContext in unique_ptr 2019-05-24 10:05:42 +03:00
9c6ec5e6c9 MXS-2483: Re-configuring SSL for servers is an error
Since listeners cannot be reconfigured, we can accept this limitation and
impose it on the servers as well. This keeps the behavior consistent and
removes the need to resolve the deletion issue (for the time being).
2019-05-24 10:05:42 +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
85a0cdf46c Fix runtime listener creation
The "default" special keywords weren't removed.
2019-05-22 10:02:48 +03:00
cab336ed89 MXS-2483: Rename SSL_LISTENER to mxs::SSLContext 2019-05-20 15:45:18 +03:00
a9b1e3a442 Move some Monitor fields to private and protected
None of the fields should be publicly writable and some should not even
be writable from derived classes.
2019-05-10 14:48:41 +03:00
5077ad62df Move monitor runtime modification functions to MonitorManager
Requires moving some general configuration checking functions to
config.cc.
2019-05-10 14:48:41 +03:00
45f508a376 Fix listener creation
The correct parameters weren't set in Listener::create and there was no
check for two listeners listening on the same socket.
2019-05-10 13:20:32 +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
95fd61b8dc Fix listener search functions
The functions that searched for listeners compared both sockets and
addresses in the same function. This made its use error prone and caused
false positives in some cases.
2019-05-06 19:55:31 +03:00
6b8ca35408 Format core source files
Formatted core .cc files according to current uncrustify configuration.
2019-05-06 16:05:50 +03:00
59be841939 MXS-2414: Rename max_auth_failures to max_auth_errors_until_block 2019-04-30 14:49:36 +03:00
db0e491ace MXS-2414: Add max_auth_failures parameter
The parameter controls how many authentication failures are allowed until
the host is blocked. The default is 10 failures per thread.
2019-04-30 14:49:35 +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
3055e49f5a MXS-2329 Use durations with query_retry_timeout
Also change auth_[connect|read|write]_timeout to be time_t.
2019-04-30 13:02:53 +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
d89f0c062b MXS-2271 Change Monitor->m_name to std::string
Also, monitor address is no longer printed.
2019-04-02 13:08:38 +03:00
1417292f0d Destroy monitor only if it's not used
If a service uses a monitor as the source of its servers, it must not be
destroyed before the monitor is removed from all services that use it.
2019-04-02 10:08:59 +03:00
388e952c5f MXS-1951: Fix port conflict detection
With the addition of SO_REUSEPORT support, it is no longer possible to
rely on the network stack to prevent multiple listeners from listening on
the same port. Without explicitly checking for the ports it would be
possible for two listeners from two different services to listen on the
same port in which case the service would be almost randomly chosen.
2019-03-28 16:34:12 +02:00
abd6e0924f Always load module defaults for monitors
The creation of a monitor from JSON relied on the non-JSON version for the
addition of default parameters but it proceeded to check the validity of
the parameters before it. Whenever parameters are checked, the default
parameters should be present.
2019-03-28 13:21:24 +02:00
c3f3200d2c Fix removal of last server from monitor
If the last server was removed, the parameter would be rejected due to it
being empty. To remove the parameter, the
MonitorManager::reconfigure_monitor should be used. Also fixed the
unnecessary serialization after a failure to remove server from a monitor
and the fact that some errors were logged instead of written to the caller
of the command.
2019-03-28 13:21:23 +02:00
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
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
22004702bc Don't use CONFIG_CONTEXT in config_runtime.cc
The only thing that's needed is MXS_CONFIG_PARAMETER.
2019-03-26 15:53:20 +02:00