Commit Graph

3711 Commits

Author SHA1 Message Date
c3dff9c60c MXS-3014: Add missing global parameters to REST API
A few global parameters weren't included in the list of parameters. A few
non-parameter values that were in the parameter object were moved out into
the attributes object. Sorted the parameter alphabetically.
2020-05-29 08:32:39 +03:00
b4108270dc MXS-2982: Fix documetation link in --help output 2020-05-11 07:44:57 +03:00
0ddee9613b MXS-2981: Treat missing TLS files as an error
Also treats partially defined TLS files as an error.
2020-05-11 07:44:56 +03:00
f527a8f2e6 2.3.19 Update Change Date 2020-04-23 14:23:57 +03:00
aacae9b508 MXS-2956: Fix use of admin_ssl_ca_cert
The parameter is now optional and uses the correct file. If defined, it
defines the CA certificate that would be used to verify client
certificate. Client certificate verification doesn't seem to currently
work as that requires a custom verification callback that interfaces with
GnuTLS.
2020-04-09 11:58:50 +03:00
7b00d2c01b MXS-2942: Only DELETE monitors with no servers
The behavior is now according to the documentation and is consistent with
how services behave.
2020-03-30 08:53:54 +03:00
e0cd6adb26 Update change date for 2.3.18 2020-03-10 10:45:47 +02:00
67fee60f80 Fix Auth Error server status
The mon_ping_or_connect_to_db resets the MYSQL handle which caused the
loss of the error message. Returning a new enumeration value for
authentication errors solves this problem.
2020-03-02 16:32:35 +02:00
e180c20055 MXS-2899: Update charset only when successful
By updating the server charset only when we successfully query it, the
charset will not change due to network connectivity problems.
2020-02-27 14:18:51 +02:00
b241f7ed2a MXS-2896: Fix monitor connection creation
The connection is now correctly null after a failed attempt to connect.
2020-02-24 12:02:50 +02:00
cfb3f79b54 Update 2.3.17 Change Date 2020-02-10 15:28:38 +02:00
39cf6a8000 MXS-2860: Update last_read only on successful reads
This prevents empty or failed reads from updating the last_read flag which
in turn gives us the correct connection idle time when network errors
occur.
2020-02-10 10:46:32 +02:00
98e6bdcd90 MXS-2878: Enforce TLS for Connector-C connections
Connector-C connections now require TLS if the servers are configured with
it.
2020-02-10 10:46:32 +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
f53faba795 MXS-2857: Disable peer verification by default
The fix to the bug where peer certificates were validated but not required
caused the default behavior to change. The default should've changed at
the same time the fix was made.
2020-01-29 14:35:03 +02:00
a0affe1bb7 MXS-2784: Use SQL to fetch default character set
The Connector-C was changed to always return only the client's charset,
not the actual charset that the connection ends up using. To cope with
this, the code has to use SQL to join the default character set name to
the default collation for it which can be used to extract the numeric ID
of the charset.
2020-01-24 10:51:15 +02:00
4f1ae70765 Allow multiple fatal signals
As long as the same thread never handles more than one fatal signal,
multiple fatal signals can be processed. This should guarantee that the
stacktrace is printed into the log while guaranteeing that recursion never
takes place if the handling of a fatal signal causes a fatal signal to be
emitted.
2020-01-23 18:37:57 +02:00
b573fcf030 MXS-2839: Make ssl_ca_cert optional
Not defining ssl_ca_cert causes the system default verification chain to
be used.
2020-01-17 09:21:06 +02:00
790d90f229 Update 2.3.16 Change Date 2020-01-15 11:08:51 +02:00
1d8139587b MXS-2710: Move client_count handling into client DCB
Due to the fact that both client connections and listeners use sessions in
2.3, the client_count tracking must be done inside the client DCB. In
addition to this, the max_connections check didn't take the current
pending connection into account which caused an off-by-one error.

This commit fixes the connection_limit test failure that was introduced by
commit 6306519e5e75575ba083ee2f0edfe7e624da5d26.
2020-01-13 17:12:04 +02:00
6e8318f72f MXS-2829: Remove config file when deleting a filter 2020-01-08 15:30:15 +02:00
36b0196c3e MXS-2825: Fix basic user privileges
All POST, PUT, DELETE and PATCH commands should be prevented regardless of
whether they define a request body.
2020-01-07 10:40:41 +02:00
6306519e5e MXS-2710: Move client_count handling inside Session
By incrementing the counters when the session is created, we know that the
counter will always be decremented correctly. This does cause the listener
session to be counted as an actual session but this is already present in
the statistics calculations and is something we have to live with in 2.3
This change also makes it possible to overshoot the connection count
limitation as the session creation is delayed until authentication
fails. Both of these problems are fixed in 2.4.
2020-01-07 10:40:40 +02:00
ff78a8bca5 Fix api reseponse 2019-12-30 10:06:59 +02:00
e725ebb7d0 Add missing set of fake event flag
The FakeEventTask called the actual DCB handler with a fake task but it
didn't set the fake event flag. This caused KILL queries to be treated as
if they were network errors.
2019-12-19 11:31:51 +02:00
a73b183555 MXS-2813: Mask password values in output
The password values are now masked with asterisks. This tells whether a
password is set or not but it does not expose any information about the
password itself.
2019-12-19 09:56:00 +02:00
b0a1eddb6c Store ignored error information
The errors that are ignored by readwritesplit are now stored as the
current close reason in the Backend. This allows the information about the
error to be retained and it can be used later in the error handler to
display the true reason why the connection was closed.
2019-12-17 13:48:51 +02:00
e057c751cd Improve handleError error messages
The hangup and error handlers now have unique messages. Although the
behavior in the handlers is practically the same in both cases, the cause
of the error is not the same.

If a socket error is present, it is added to the error message. If an
error is present, it should clearly show the reason why the TCP socket was
closed.

The is_fake_event boolean helps distinguish fake events from real
ones. This makes figuring out the real source of hangup events easier.
2019-12-13 10:50:04 +02:00
7be6ee1616 MXS-2789: Make stale journal messages notifications
These events are of no actual consequence and can be safely ignored. It is
simply informational.
2019-12-10 11:11:05 +02:00
9e9abbe8be MXS-2786: Require certificates when verifying peers
When peer verification is enabled, clients must present a certificate.
2019-12-03 10:34:00 +02:00
cd9b82ba09 Print OpenSSL errors on CA cert errors
This helps figure out why the certificate is not OK.
2019-11-29 16:16:35 +02:00
fb23f3eb3e OpenSSL 1.1 supports TLSv1.1 and TLSv1.2
TLSv1.0 is the only version that newer OpenSSL versions do not support.
2019-11-29 16:16:35 +02:00
d41975dde8 MXS-2782 Return nullptr if non-existing worker is asked for
Earlier assert in debug mode and garbage in release mode.
2019-11-28 14:33:00 +02:00
774e9bc3f0 MXS-2762: Add ssl_version=TLSv13
Added new ssl_version value for TLSv1.3. This allows the list of accepted
protocol versions to be limited to all supported protocols. Previously
TLSv1.3 was only available with ssl_version=MAX.

Also fixed the enum value serialization to use a lowercase v. This causes
them to have the same value as the one used in the enum.
2019-11-28 07:48:01 +02:00
f7f865d4c3 MXS-2763: Log correct error for unsupported TLS versions
Previously when ssl_version was used with a value that is not supported on
the system, an unknown parameter error was returned. This could be
confusing and logging a proper error message should make it clear.
2019-11-28 07:48:01 +02:00
638d1bf354 MXS-2760: Fix ssl_version conversion
The value is now correctly converted to the enum values.
2019-11-11 09:05:46 +02:00
df6c56e7ca Update 2.3.13 Change Date 2019-10-29 12:51:31 +02:00
446a3fac15 MXS-2720: Fix service session count
The number of sessions wasn't always incremented but it was always
decremented. This happened primarily when authentication failed. By making
the management of the counters a part of the object lifecycle, this
problem goes away.
2019-10-29 09:26:41 +02:00
26a56f48b2 MXS-2720: Assert that client count is non-negative 2019-10-29 09:26:41 +02:00
cf8ff493bc Add query canonicalization profiling
A small helper program like this helps figure out performance problems
with the function.
2019-10-29 09:26:41 +02:00
8258e14bfe Add minor optimizations to get_canonical
Requiring contiguous buffers removes the need to use mxs::Buffer which
also removes the need to check for buffer boundaries.

Converted all the functions used by get_canonical into `static inline` so
that the compiler knows it can inline them. A few of them weren't `static`
which made the calls to the functions unnecessarily expensive.
2019-10-29 09:26:41 +02:00
7f41bfa5f8 Fix minor defect in get_canonical
The backslash was added instead of assigned. Since the value stored at
that position is always a null byte, assignment and addition would result
in the same outcome.
2019-10-29 09:26:41 +02:00
d6eb73c9ee MXS-2639: Fix maxinfo memory leak
The JSON version didn't call json_decref on the object it created.
2019-10-29 09:26:41 +02:00
c609042874 MXS-2706: Fix maxinfo JSON output
The output now correctly formats integers.
2019-10-29 09:26:41 +02:00
f587ec191d MXS-2688 Add QC operator QUERY_OP_SET
Allows RWS to unconditionally send all SET-statements to
all servers.
2019-09-20 09:27:38 +03:00
dabab543cc MXS-2684 Add throttling callbacks to backend DCB from pool
Add throttling callbacks to a backend DCB taken from the persistent
pool. They were removed when the dcb was put into the pool.
2019-09-17 14:45:53 +03:00
00feb61b23 MXS-2652 Do not clear maintenance flag when a server goes down
The set of flags to clear should be well-defined.
2019-09-06 09:43:32 +03:00
5899556d89 MXS-2592 Enable runtime configuration of session_trace 2019-08-09 19:36:24 +03:00
547236b7a4 MXS-2609: Store history size in Backend
When a connection is created, the size of the history that is about to be
replayed is known. Storing this and decrementing it each time a session
command is completed tells us when the Backend has finished replaying the
session command history. This can then be used to distinguish whether a
session command executed on a master should be retried or whether to
simply discard the connection.
2019-08-09 01:54:09 +03:00
918a2964d5 MXS-2592 Add configuration for session specific in-memory log
When enabled each session will write log messages in the in-memory log.
If session ends in error this log is written to the actual log in disk.
2019-07-28 20:56:22 +03:00