Commit Graph

13650 Commits

Author SHA1 Message Date
bef8881cab Merge branch '2.2' into 2.3 2019-05-28 14:17:43 +03:00
edb669100d MXS-2511: Update connector-c
Updated to 3.0.10.
2019-05-28 14:00:28 +03:00
075ed00f58 MXS-2481 Fix rebase error 2019-05-28 12:43:21 +03:00
6e5f7fcfbf MXS-2481 Add timeout and comments
When node is taken down, we don't wait forever.
Added comments that make it easier to follow the test when it
is running.
2019-05-28 12:36:21 +03:00
dcc7d195a3 MXS-2481 Add/fix copyright blurb 2019-05-28 12:36:21 +03:00
71b648e965 MXS-2481 Test transaction replay at group change
Take down a node other than the one we are connected to, which
will cause a group change error, and test that MaxScale catches
that and replay the transaction.
2019-05-28 12:36:21 +03:00
e0b397455d MXS-2481 Check that server has changed 2019-05-28 12:36:21 +03:00
1c3ccfe254 MXS-2481 Factor out functionality
To be used by other test-case.
2019-05-28 12:36:21 +03:00
37e526eb8d MXS-2481 Rename test
No other changes.
2019-05-28 12:36:21 +03:00
2bcee1be8b MXS-2481 Test transaction replay when node goes down
Currently tests transaction replay when node goes down.
Group change test will be added and name of test will be
changed accordingly.
2019-05-28 12:36:21 +03:00
60d065473e MXS-2481 Handle sqlite3 oom error 2019-05-28 12:36:21 +03:00
feae0cda17 MXS-2481 Dont log confusing things
At first start there will be no persistent information. No point
in logging that we will not use that information.
2019-05-28 12:36:21 +03:00
1bd82555d9 MXS-2481 Add Clustrix group change test skeleton 2019-05-28 12:36:21 +03:00
7b803f621c MXS-2481 Change blurb 2019-05-28 12:36:21 +03:00
8204c5099b MXS-2481 Ensure directory exists before creating db 2019-05-28 12:36:21 +03:00
8a2c43d297 MXS-2481 Add configuration file template 2019-05-28 12:36:21 +03:00
18214b1aa2 MXS-2481 Add Clustrix module-command test
Softfailing should turn the state of a server to Drained.
2019-05-28 12:36:21 +03:00
c0a0bb86a0 MXS-2481 Add MaxRest functionality
- show_server
- call_command
2019-05-28 12:36:21 +03:00
c35d92eccc MXS-2481 Check that node-absense leads to Down
If MaxScale cannot ping the health-check port of a node, the
state of the node should become 'Down'.
2019-05-28 12:36:21 +03:00
a8487a945a MXS-2481 When Clustrix [un]block health port as well
In the case of Clustrix, it is not sufficient to block the MariaDB
port alone, but the health-check port must be blocked as well.
2019-05-28 12:36:21 +03:00
0d3a235851 MXS-2481 Allow [un]block-commands to be overriden
In the case of Clustrix, there are other ports to block as well.
2019-05-28 12:25:21 +03:00
5a26bd8ce5 MXS-2481 Rename MaxCtrl to MaxRest
So as not to believe that the program depends upon or uses
maxctrl.
2019-05-28 12:25:21 +03:00
97ad45125d MXS-2481 Add simple Clustrix test 2019-05-28 12:25:21 +03:00
b837e24995 MXS-2481 Add MaxCtrl class to test framework
The purpose of this class is to make it easy from a test program
to access the output of the REST-API. Currently it provides only
the equivalent of "maxctrl list servers", but it can be extended
if and when additional needs arise.

Right now it's implemented so that curl is executed on the 0th
MaxScale instance, using the ssh mechanism of the test framework.
2019-05-28 12:25:21 +03:00
11a8488162 Begin converting EXTERNCMD to a class
Mostly renaming for now.
2019-05-28 11:32:23 +03:00
5043293b97 Clean up monitor_relations_to_server()
Server can only have one monitor.
2019-05-28 11:32:23 +03:00
0f1e964192 Merge branch '2.3' into develop 2019-05-28 11:15:46 +03:00
4d3d6e9d06 MXS-2479 Extend pam authenticator test to use a customized pam service
The test now covers additional messages being sent by the pam api.
2019-05-28 11:04:53 +03:00
a82841333d Merge branch '2.3' into develop 2019-05-28 10:57:18 +03:00
dda2c1964d Merge commit '05ed272c1627b21ff623b7fdf5a60f2ba2f4f5d0' into develop 2019-05-27 19:30:29 +03:00
d128c9a09b MXS-2504 Kick out super-users from master server during switchover
The monitor queries for logged in users with super-privileges and kicks them out to
prevent writes to master. Normal users can stay since their writes are prevented by
read_only. Also, the master-status is removed from the master manually to signal to
routers that no more writes should go to master.
2019-05-27 18:11:46 +03:00
3721d6abf2 MXS-2507: Check stored integer size
If the avro block is smaller than the size of the stored data, the file
was created with a block size that was too small. Even the reference Avro
implementation can't read the file in this case.
2019-05-27 15:07:35 +03:00
387bf0ccc2 MXS-2507: Fix avrorouter token processing
The token comparison function did the comparison wrong: The token needs to
be an exact match instead of a partial one.
2019-05-27 09:34:38 +03:00
05ed272c16 Fix format-truncation warnings in blr
The custom message must be smaller than the actual message to guarantee no
truncation takes place.
2019-05-27 03:24:05 +03:00
a33996ab20 Remove redundant sort in monitor_relations_to_server
Servers can have only one monitor relationship.
2019-05-24 18:29:50 +03:00
752aa9de57 Make lambdas in monitor.cc more readable
Putting the function call and the start of the lambda on different lines
keeps the lambda contents less indented.
2019-05-24 18:26:51 +03:00
859e930466 MXS-2486: Make SSL configurations immutable
Changes to SSL configurations is expected to be rare which allows them to
be made into immutable objects once created. This is an acceptable
compromise between performance and usability.
2019-05-24 15:33:18 +03:00
52ef9afcc6 MXS-2483: Add missing deletion of defaulted functions 2019-05-24 15:33:18 +03:00
e5f0d3eb37 Only log one host blocking message
The message would be logged multiple times if multiple authentication
attemps failed at the same time.

Also renamed the RateLimit class method to the same as the Listener one.
2019-05-24 15:33:18 +03:00
c2975d33f8 MXS-2483: Fix dcb.hh includes
The header depended on ssl.hh to include the OpenSSL headers even though
it used OpenSSL types. By fixing these dependencies the ssl.h header can
now freely include the rworker_local type which removes the need for the
hidden implementation of SSLProvider.
2019-05-24 15:33:18 +03:00
d5ec357731 Fix binlogrouter SSL creation
The SSLContext could get invalid parameters as the router unconditionally
added all the parameters.
2019-05-24 15:33:17 +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
cb72b2a5cc MXS-2483: Move SSL functionality into SSLProvider
The class is intended to be inherited by objects that need an SSL context
and a configuration. In practice this will be servers and listeners.

The SSLContext is stored in a rworker_local shared_ptr that makes it
possible to update safely. As the copying is always done behind a lock the
cached local value always holds a valid SSLContext instance for the
duration of all function calls.

Using the pImpl idiom, the routingworker.hh header is not exposed in the
ssl.hh header. This allows the SSLProvider class to be inherited more
easily.
2019-05-24 15:33:17 +03:00
8a4b58d52c MXS-2483: Move SSL configuration into SSLConfig
This way the configuration information can be accessed without the
SSLContext.
2019-05-24 15:33:17 +03:00
075ad1cfb3 Fix JSON representation of Listener parameters
The parameters were still hard-coded and not generated from the actual
parameters.
2019-05-24 15:33:17 +03:00
47ebcdcc02 Sort server relationships
As server relationships are unordered, sorting them guarantees a certain
order. This fixes the MaxCtrl cluster diff test failure.

Also formatted monitor.cc sources: the indentation seems to be off.
2019-05-24 15:33:17 +03:00
bed28db3fd Merge branch '2.3' into develop 2019-05-24 13:55:47 +03:00
eda547c86f MXS-1851: Add hard-coded protocol module check
This way a hard to track crash is avoided and the user knows how to fix
it.
2019-05-24 13:55:43 +03:00
a1697e2aa6 MXS-2479 PAMBackendAuth is more tolerant of extra messages.
The authenticator can now receive additional questions from the server even
after the original password-query.
2019-05-24 11:31:55 +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