11285 Commits

Author SHA1 Message Date
Markus Mäkelä
6e79e34dd7
Do not destroy services when setting filters fails
If the setting of filters for a service fails at startup, it need not be
destroyed as it will be destroyed when MaxScale stops.
2018-08-09 12:54:13 +03:00
Markus Mäkelä
cce0aaa7e1
MXS-1929: Extend runtime filter test
Added testing of how MaxScale displays filters that are destroyed but
still in use.
2018-08-09 12:54:12 +03:00
Markus Mäkelä
30fe7d2931
MXS-1929: Add basic filter creation/destruction test
The test creates and destroys a regexfilter at runtime and checks that the
filter remains in use for as long as the connection is open.
2018-08-09 12:54:11 +03:00
Markus Mäkelä
25bc385db2
MXS-1929: Check presence of filter parameters
The parameters were made optional as not all filters require parameters.
2018-08-09 12:54:10 +03:00
Markus Mäkelä
785507b002
Check return value of nodejs --version
FindNodeJS.cmake once failed due to an error executing the program. To see
why it failed, the error output of the command should be printed.
2018-08-09 12:54:06 +03:00
Johan Wikman
2539183be2 MXS-2000 Add query_classifier_cache_size to maxscale resource 2018-08-09 08:37:44 +03:00
Johan Wikman
cf4521503f MXS-2000 Add 'show thread[s]' to maxctrl
Show thread[s] shows detailed information about threads.
2018-08-09 08:35:57 +03:00
Johan Wikman
515cc3231c MXS-2000 Introduce 'maxctrl list threads'
Basically the same as the existing 'show threads', with a bit
shorter names. The current 'show threads' will be changed to
resemble the other 'show' commands, that is, the output is a
list of detailed information of each object.
2018-08-09 08:35:57 +03:00
Johan Wikman
055b93ba1a MXS-1962 Create test for implicit masking firewall
By default, if some column should be masked, then if a function
is used in conjunction with that column, the statement should be
rejected.
2018-08-09 08:35:03 +03:00
Johan Wikman
5c6db6dc06 Merge branch '2.2' into develop 2018-08-08 11:20:15 +03:00
Johan Wikman
f4c564481c Update version of 2.2 2018-08-08 11:19:13 +03:00
Johan Wikman
21cb52d0e7 Merge branch '2.2' into develop 2018-08-08 11:02:20 +03:00
Johan Wikman
ebbd3b8312 Merge branch '2.2.13' into 2.2 2018-08-08 11:02:06 +03:00
Johan Wikman
8792a4a3d1 Update release date 2018-08-08 10:58:21 +03:00
Johan Wikman
0b3e9cce75 Fix rebase problems 2018-08-08 09:21:59 +03:00
Johan Wikman
c06b36a6ee MXS-1992 Remove place-holder for specific error handling 2018-08-08 09:17:58 +03:00
Johan Wikman
326bb88f70 MXS-1992 Expose config.cc:runtime_error as config_runtime_error 2018-08-08 09:17:58 +03:00
Johan Wikman
fbb79adc52 MXS-1992 Address review issues 2018-08-08 09:17:15 +03:00
Johan Wikman
1b521b16a9 MXS-1992 Move QC json "parsing" to query_classifier.cc 2018-08-08 09:17:15 +03:00
Johan Wikman
2188090742 MXS-1992 Expose type checking functions of config_runtime.cc
The functions

bool runtime_is_string_or_null(json_t* json, const char* path);
bool runtime_is_bool_or_null(json_t* json, const char* path);
bool runtime_is_count_or_null(json_t* json, const char* path);

can now be called from anywhere inside MaxScale.
2018-08-08 09:17:15 +03:00
Johan Wikman
185758ef06 MXS-1992 Allow changing the QC cache size 2018-08-08 09:17:15 +03:00
Johan Wikman
dae6cf0648 MXS-1992 Allow the setting/getting of cache size at runtime 2018-08-08 09:16:19 +03:00
Johan Wikman
bb77ae7b95 MXS-1992 Rename internal/query_classifier.h to .hh 2018-08-08 09:16:19 +03:00
Johan Wikman
90569e3a28 MXS-1992 Expose qc stats in threads info
In principle it would be better if the qc information were
obtained via a specific query_classifier resource. However,
there are multiple problems with that (e.g. the qc has no way
of safely accessing information of another thread) and hence
the worker specific qc cache statistics is reported as part of
the worker statistics.
2018-08-08 09:16:19 +03:00
Johan Wikman
fbd3b08c1e MXS-1992 Make preparations for REST-API 2018-08-08 09:16:19 +03:00
Markus Mäkelä
1a7fa349fd
MXS-1929: Use correct variable
The service capabilities were not set for filters as the name overlapped
with a local variable. The variable name was fixed but the actual use of
it was not.
2018-08-07 22:30:19 +03:00
Markus Mäkelä
93946375ca
Ignore passwd in persisted configurations
If a passwd parameter is defined in a persisted configuration, it will be
ignored. This will make upgrades from 2.2 to 2.3 possible with persisted
configurations.
2018-08-07 22:30:18 +03:00
Markus Mäkelä
b68d9920cf
Reopen connection before validating data
The setup_binlog test seems to fail due to a broken backend conection.
2018-08-07 22:30:18 +03:00
Markus Mäkelä
bb1efd1b34
Merge branch '2.2' into develop 2018-08-07 22:20:27 +03:00
Markus Mäkelä
7394f03cd9
Exit with failure if coredump is found in destructor
If the test would otherwise succeed but a coredump is found when the logs
are copied in the destructor, the test would pass. To prevent this, the
destructor should always exit with a non-zero status when it detects an
error.
2018-08-07 22:14:33 +03:00
Markus Mäkelä
055043b5b8
Fail faster in NPM tests
The test script now stops if the configuration or build steps fail.
2018-08-07 22:14:33 +03:00
Markus Mäkelä
446116a8bb
MXS-1999: Fix removal of undefined relationships
If a relationship isn't defined, it should not be removed. Only if a
relationship is change to a null relationship, should it be removed.

Also fixed the maxctrl test suite to verify that both it and the REST API
tests pass.
2018-08-07 22:14:33 +03:00
Markus Mäkelä
4fd4d6bb01
MXS-1999: Fix null relationship handling
The data of the relationship should be set to null to delete the
relationship. Conceptually it is different from setting it to an empty
relationship but in practice both lead to the same end result.

Updated tests to use correct relationships and added test cases for
detection of invalid relationships.
2018-08-07 22:14:32 +03:00
Markus Mäkelä
3754008e43
Add missing cdc_connector dependencies
Added the missing dependency on Jansson to the CDC connector.
2018-08-07 22:14:32 +03:00
Esa Korhonen
3f2838ab36 Avoid repeated logging when retrying automatic failover or switchover
Prevents repeated logging of similar error messages.
2018-08-07 16:36:48 +03:00
Esa Korhonen
17c84a22c7 Refactor preparations to failover
The two operations are quite similar so the code should look
similar as well and use shared functions.
2018-08-07 16:33:56 +03:00
Johan Wikman
646efbc6be MXS-1736 Fix some typos in MaxScale-Information-Schema.md 2018-08-07 15:58:11 +03:00
Johan Wikman
974bf3c115 MXS-1736 Clarify MaxInfo tutorial 2018-08-07 12:59:11 +03:00
Johan Wikman
94994268bd MXS-1736 Wrap lines of MaxScale-Information-Schema.md
No other changes.
2018-08-07 11:17:05 +03:00
Marko
ac57b4f71f Fix show database and show tables queries
Changes with ResultSet caused the send_databases and send_tables
functions to always return false. Also changed send_database to
return void since it shouldn't be able to fail anymore.
2018-08-07 08:54:16 +03:00
Marko
7ea8ff9e59 MXS-1763 Move default location of maxadmin socket to /run/maxscale
MaxAdmin socket is now placed to piddir used by MaxScale.
2018-08-07 08:40:28 +03:00
Markus Mäkelä
56d4e5a645
Fix target dependencies
Added missing dependencies to targets that were missing it.
2018-08-06 21:20:29 +03:00
Markus Mäkelä
a1d5a06ba7
Use only backend DCBs with session_unlink_backend_dcb
The client DCB isn't in the set of DCBs managed by the session.
2018-08-06 21:20:29 +03:00
Markus Mäkelä
9d30c524e3
MXS-1929: Fix mock testing framework
The testing framework extended the public struct, not the private
one. Also moved the internal Session class inside the mxs namespace to
prevent conflicts with the mock testing Session class.
2018-08-06 21:20:29 +03:00
Markus Mäkelä
6c6567cce7
MXS-1929: Add alter service filters MaxCtrl command
The command sets the active set of filters for a service. This allows
modifications to the filter list at runtime via MaxCtrl.
2018-08-06 21:20:29 +03:00
Markus Mäkelä
03553783fb
MXS-1929: Process filter relationships for services
The filter relationships of a service are now interpreted as an ordered
list of filters being used by the service. As the relationship data in the
JSON API specification is represented as an array, it does not prevent
multiple relationships from appearing. For MaxScale, this means that
interpreting the filter's order does not break it.
2018-08-06 21:20:29 +03:00
Markus Mäkelä
56ede5bbf4
MXS-1929: Remove string parsing from Service
As the filters are only passed as a pipe separated list when the
configuration is being processed, there's no need to have the interface
conform to that. Passing a list of filter names makes it more flexible and
will make it's use in the runtime configuration easier.
2018-08-06 21:20:29 +03:00
Markus Mäkelä
3a185902b7
MXS-1929: Implement filter destruction
Now that the filters are fully reference counted, their destruction is
trivially simple to implement.
2018-08-06 21:20:29 +03:00
Markus Mäkelä
8cb3a85afd
MXS-1929: Fix MaxCtrl errors
The filter parameters were a mandatory argument even for filters that
don't need parameters. Also fixed the usage information.
2018-08-06 21:20:29 +03:00
Markus Mäkelä
0777de348b
MXS-1929: Fix handling of version_string
The parameter was set to 5.5.5- if it wasn't defined.
2018-08-06 21:20:29 +03:00