Commit Graph

8921 Commits

Author SHA1 Message Date
5c76d3d906 Merge branch '2.3' into 2.4 2020-07-24 08:01:53 +03:00
aaec73a8c8 MXS-3089: Close backend on failed session command
This correctly triggers the session command response processing to accept
results from other servers than the current master backend if the session
can continue. If the session cannot continue, it will be stopped
immediately.
2020-07-23 09:26:53 +03:00
cf1d1178d7 MXS-3087: Fix diagnostic memory leaks
Fixed leak in load_utils.cc and the cache filter. Also changed all
instances of json_object_set with json_object_set_new to make sure it's
only used when the references are to be stolen.
2020-07-22 13:27:36 +03:00
f2a837e2f1 Fix memory leak in throttlefilter
The filter would leak the buffer when it disconnects a client. This fixes
the throttlefilter test if it's run with ASAN or valgrind.
2020-07-15 15:35:12 +03:00
ea35b62373 MXS-619: Delay destruction of the client DCB
By delaying the processing of a client DCB in the zombie queue, we avoid
initiating the shutdown process of the backend DCBs too early. This solves
the problem of the previous implementation where the session shutdown
proceeded too far before the delaying process started.
2020-07-14 10:47:38 +03:00
6abdb60b58 MXS-619: Temporarily disable the fix
The fix isn't fully functional as closed DCBs never process the events
they receive. The mechanism would work if certain events would be
processed but they'll have to be fixed in a later release.
2020-07-13 15:02:47 +03:00
fc9c9fcd77 2.4.11 Update change date 2020-07-07 10:01:38 +03:00
32fa7b6800 MXS-3069: Fix plugin name comparison
Connectors that wouldn't send the plugin name even when the plugin
authentication capability was enabled would have to do an extra step in
the authentication.
2020-07-07 09:23:23 +03:00
6c9249131f MXS-3064: Use latin1 charset
This prevents the server from selecting the charset under which the
queries are processed which can result in conflicts if the tables used are
not compatible with the charset of the string literals used in the query.
2020-07-07 09:23:22 +03:00
4fe71b41ed MXS-3038: Don't connect to lagging slaves
There's no use connecting to a lagging slave if a replication lag limit
has been set.
2020-07-07 09:23:22 +03:00
7520efd218 MXS-3059: Don't use STL containers concurrently
The diagnostics_json call could access the std::unordered_map at the same
time it was being updated by the monitoring thread. This leads to
undefined behavior which in the case of MXS-3059 manifested as a segfault.
2020-07-07 09:23:22 +03:00
ad4bd26ff0 MXS-2585: Check for failed allocations
Since nothrow was used, the return value should be checked. By moving the
null-check after the node allocation part, we'll detect it.
2020-07-07 09:23:22 +03:00
ba289dc589 Fix debug assertion in cache
The call to gwbuf_length will fail if the pointed to buffer isn't the head
of the chain. To prevent this, the length is calculated before the buffer
is appended.

Also fixed the use of gwbuf_append. The return value should be assigned
and the code shouldn't reply on the value passed to the function being
correct.
2020-07-07 09:23:22 +03:00
7ad3485892 MXS-3054: Fix crash on malformed mapping reply
The code used a null GWBUF with gwbuf_append which causes a crash. The
return value of the function that used it was also not correctly handled
and would be mistaken for a different error.
2020-07-02 11:34:40 +03:00
608eb95284 MXS-3055: Prevent sending of an extra COM_QUIT
If the protocol routes a COM_QUIT packet to the backend, it must not
generate a packet when it is shutting down. This could cause unexpected
write errors if the backend server managed to close the socket before the
write was done.
2020-07-02 11:34:40 +03:00
a655c5d08c MXS-619: Allow backend authentication to complete
By deferring the closing of a DCB until the protocol tells that it's in a
stable state, we avoid closing the connection mid-authentication. This
makes sure that all connections have reached a stable state before they
are closed which in turn prevents the connections from counting towards
aborted connects (or failed authentications like it did with the old fix).
2020-07-02 11:34:39 +03:00
ae2cad9254 MXS-619: Revert the partial fix
The fix causes a lot of confusion with the failed authentication messages
and is not worth it to fix the problem.
2020-07-02 11:22:22 +03:00
1ad8ae97d3 MXS-3054: Prevent pooling of DCBs with inbound data
If a DCB is expecting a response from the server, it must not be placed
into the connection pool. This prevents the case where unexpected
responses would be delivered to DCBs taken out of the connection pool.
2020-07-02 11:22:22 +03:00
9f07613330 Merge branch '2.3' into 2.4 2020-07-02 10:38:54 +03:00
c9badcb09c Fix installation order of signal handlers
The shutdown signal handlers were installed before the workers were
initialized and weren't removed before the workers were deleted. This
would lead to a debug assertion and an eventual crash when a SIGTERM
signal was received outside of the expected scope.

The proper way to do this is to install the handlers only after the system
is up and running and to disable them as soon as the shutdown process
starts.

This mostly happened with the mxs621_unreadable_cnf test as it seemed to
receive a SIGTERM during the execution of the at-exit handlers.
2020-07-02 10:33:18 +03:00
a4a7a52150 Merge branch '2.4.10' into 2.4 2020-06-08 11:40:41 +03:00
098ffde13c Remove obsolete debug assert from PamAuth
Would be always hit in debug mode.
2020-06-05 19:04:44 +03:00
7781f7042a 2.4.10 Update change date 2020-06-05 10:21:37 +03:00
5ebae9be90 Merge branch '2.3' into 2.4 2020-06-05 09:36:24 +03:00
aa11c960b1 2.3.20 Update change date 2020-06-05 09:31:45 +03:00
00e5cbf51c Merge branch '2.3' into 2.4 2020-06-05 08:36:07 +03:00
d025f5123e MXS-3023: Fix ID generator overflow
The result must always be non-negative.
2020-06-04 15:31:17 +03:00
da5af75c1c MXS-3021: Make strictness of dbfwfilter configurable
In some cases the dbfwfilter is too strict and SQL that would not match a
rule is blocked due to it not being fully parsed. To allow a more lenient
mode of operation, the requirement for full parsing must be made
configurable.
2020-06-04 08:28:23 +03:00
727aeb4a08 Merge branch '2.3' into 2.4 2020-06-02 10:53:05 +03:00
cb8b4546cb Don't use client SHA1 for fake responses
When a fake handshake response is generated for a connection that hasn't
received the server's handshake, the client's SHA1 would be used with a
static scramble. This, in theory, would weaken the authentication to some
extend so to completely prevent this, a null password is used. This
removes any possibility of the password being exposed.
2020-06-02 10:17:40 +03:00
922630f76f MXS-3019: Fix enum value validation
Also added a test case that reproduces the problem and verifies that it is
fixed.
2020-06-01 20:36:59 +03:00
f013d3ccd9 MXS-3013: Add reload endpoint for services
The endpoint reloads the database users. This can also be used in the
future to refresh encrypted credentials when they are no longer loaded
every time an encrypted password is used.
2020-06-01 12:26:29 +03:00
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
e2642d64b9 MXS-3010: Fix maxkeys and the test
The test doesn't work properly if the maxscale user doesn't exist and the
key file permissions cannot be given to it. The test should use the
current user as the owner of the file but it turned out that the -u option
is broken.

Extended the test case to make sure the same password with the same
encryption key results in the same hash.
2020-05-25 19:45:33 +03:00
265a0cb449 MXS-3000: Serialize all global parameters
Not all parameters were serialized to disk.
2020-05-25 10:27:52 +03:00
4cc5fa115a Merge branch '2.3' into 2.4 2020-05-11 08:42:02 +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
321126660f 2.4.9 Update Change Date 2020-04-29 10:17:14 +03:00
d3d7054639 Merge branch '2.3' into 2.4 2020-04-24 16:09:20 +03:00
25b8eeb415 MXS-2972: Store servers in the cache key
This allows the set of servers used by the service to also participate in
the cache value resolution. This will prevent the most obvious of problems
but any abstractions of the servers will prevent this from working.
2020-04-23 14:34:38 +03:00
f527a8f2e6 2.3.19 Update Change Date 2020-04-23 14:23:57 +03:00
e87ad4abb9 Log USE message on info level
This tells us which server gets the USE command.
2020-04-22 09:01:27 +03:00
9efd33186d MXS-2968: Fix direct replication server_id 2020-04-22 09:01:27 +03:00
c8c919be27 Merge branch '2.3' into 2.4 2020-04-09 12:02:44 +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
83b03d89b5 MXS-2861: Add ssl_cipher to servers and listeners
This allows the set of TLSv1.2 ciphers to be selected which is required to
fulfill certain regulatory requirements.
2020-04-09 11:48:44 +03:00
6fdb7ed089 Merge remote-tracking branch 'origin/2.3' into 2.4 2020-03-30 10:23:35 +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
e6ee3aaff4 MXS-2943: Use correct variable 2020-03-26 06:08:56 +02:00