Commit Graph

12935 Commits

Author SHA1 Message Date
48d2f3bd84 Correct REST-API-Tutorial 2019-03-07 15:59:27 +02:00
5b43940559 Track session state only when required
The protocol should not track the session state as the parsing is quite
expensive with the current code. This change is a workaround that enables
the parsing only when required. A proper way to handle this would be to do
all the response processing in one place thus avoiding the duplication of
work.
2019-03-07 15:59:26 +02:00
b97976c4ee MXS-2323: Close stale connections
Cleaning up and closing stale connections to servers in maintenance mode
helps administrators see when a server is no longer in use.
2019-03-07 15:59:26 +02:00
a7be3c527c Remove unnecessary memory allocations
Given the fact that there exist only three possible categories, the map
can be replaced with a static array that needs no memory
allocations. Making this array thread-local allows it to be reused which
places an upper limit on the number of memory allocations.
2019-03-07 15:59:26 +02:00
e7f739e95d MXS-2337 Fix sharding test
There is now enought time between queries that the shard map is reconstructed.
2019-03-07 13:07:20 +02:00
4208dff2e6 MXS-2337 Schemarouter responds correctly to SHOW TABLES
The router now handles the query similarly to a "SHOW TABLES FROM X"
with the current db assigned to X.
2019-03-07 13:07:20 +02:00
9572ff84ea Merge branch '2.3' into develop 2019-03-05 10:37:56 +02:00
6332f0876b Merge remote-tracking branch 'origin/2.3' into 2.3 2019-03-05 04:59:26 +02:00
77ef3dd613 Merge branch '2.2' into 2.3 2019-03-05 04:54:40 +02:00
8a0b6005a4 MXS-2335: Fix lower_case_table_names
The database check always used the case-sensitive SQL to check that the
database exists.
2019-03-05 00:07:13 +02:00
83fc3b1bc2 Merge branch '2.3' into develop 2019-03-04 17:43:53 +02:00
42b3f970c5 MXS-2260: Add REST API tutorial
The tutorial shows how to configure the MaxScale REST API and communicate
with it using the `curl` command line client.
2019-03-04 16:46:29 +02:00
4fd4b726a1 MXS-2325 Only enable events that were enabled on the master
The monitor now continuously updates a list of enabled server events. When
promoting a new master in failover/switchover, only events that were enabled
on the previous master are enabled on the new. This avoids enabling events
that may have been disabled on the master yet stayed in the SLAVESIDE_DISABLED-
state on the slave.

In the case of reset-replication command, events on the new master are only
enabled if the monitor had a master when the command was launched. Otherwise
all events remain disabled.
2019-03-04 16:00:07 +02:00
c2459c420d MXS-2304 Rename fields of CONFIG_CONTEXT
Added m_-prefix.
2019-03-04 12:27:36 +02:00
900cbb4cff MXS-2304 Move last config_get_x() functions inside class 2019-03-04 12:27:36 +02:00
966787e119 do not create or copy repos if build failed 2019-03-04 11:29:38 +02:00
b7bfb08216 Merge branch '2.2' of github.com:mariadb-corporation/MaxScale into 2.2 2019-03-04 10:54:31 +02:00
019c8fc2e1 MXS-2333 Correct typo in Clustrix monitor tutorial 2019-03-04 10:43:39 +02:00
af33d19703 Add short version of --tls-verify-server-cert
It is frequently used when using self-signed certificates so making it
shorther makes life easier. Also added the missing --tls-passphrase into
the TLS options group.
2019-03-04 10:13:06 +02:00
6436d959e3 Fix avrorouter file rotation
The avro filenames weren't processed properly which caused them to not
work correctly.
2019-03-04 08:53:13 +02:00
7904cdaefb Fix assume_unique_hostnames
It was always set to true when the servers were created.
2019-03-04 08:53:12 +02:00
14557c7455 MXS-2357: Explain runtime changes in alter service
The help output now states that a subset of the routers support runtime
configuration changes to all parameters.
2019-03-04 08:53:12 +02:00
7fb2ae571b Improve blocked host error message
The error now explains how the problem can be mitigated by increasing
max_connect_errors on the backend server.
2019-03-04 08:53:12 +02:00
6c05fa7d54 MXS-2302: Use unique_ptr for hint storage
This removes the need to explicitly free them.
2019-03-04 08:48:32 +02:00
d52f685ee2 MXS-2302: Rename hintfilter objects
Renamed the objects to camelcase variants.
2019-03-04 08:48:32 +02:00
e5299e1eab MXS-2302: Move hint parser into its own class
Keeping the parser state internal to a subclass makes the code more
readable and allows the removal of most parameters. It also removes the
need to return iterator ranges from the tokenization function thus making
the Token class obsolete.

Unit testing benefits from this as well as it more closely resembles usage
in the wild as more of the code can be run without a live system.
2019-03-04 08:48:32 +02:00
3fef15e892 MXS-2302: Remove templates from parsing code
The templates were only used to make testing easier and upon review the
gain in testing convenience wasn't large enough to warrant its use.
2019-03-04 08:48:32 +02:00
684ddfd12d MXS-2302: Use filter template in hintfilter 2019-03-04 08:48:32 +02:00
1d49e45036 MXS-2302: Do hint processing in a member function
Also fixed a unit test failure.
2019-03-04 08:48:32 +02:00
f106864659 MXS-2302: Use STL containers for hint storage
The named hints and the hint stack are now stored in STL containers.
2019-03-04 08:48:32 +02:00
a6ab05b673 Fix format-overflow warnings in tests
The tests previously ignored these warnings but the change in compiler
flags caused them to fail.
2019-03-04 08:48:32 +02:00
2045ac656b MXS-2302: Remove unused hintfilter code
Also moved the token types into the correct file.
2019-03-04 08:48:32 +02:00
ec234124b1 MXS-2302: Remove unused parsing code
Removed all code that is no longer used. The hint stack mechanism is still
in use but can, and should, be replaced with std::vector.
2019-03-04 08:48:32 +02:00
c5a8b693c3 MXS-2302: Take new hint parsing code into use 2019-03-04 08:48:32 +02:00
ca9224bf88 MXS-2302: Rewrite hint tokenization and parsing
The tokenization is somewhat crude but given the small amount of token
types it is acceptably efficient while still maintaining readability. The
parsing is quite simple to implement as a sort of a recursive descent
parser and is a lot more readable that the old state machine
implementation.

Extended the unit test to check that all supported hint types are parsed
correctly. The stack mechanism isn't fully covered by the unit test and it
needs to be added once the stack mechanism uses STL containers.
2019-03-04 08:48:32 +02:00
897fee715d MXS-2302: Use const char* in hintfilter functions 2019-03-04 08:48:32 +02:00
11be8ed0f0 MXS-2302: Add comment extraction code
The code extracts comments from a query. All three comment types are
supported and the double dash comments properly handle invalid input
(fixes MXS-2289).

The code uses iterators to access to the query and returns a list of
iterator pairs as start and end markers to comments. This makes testing
easier as the input and output can be passed as an std::string.
2019-03-04 08:48:32 +02:00
9ec4557075 create symlink rhel -> centos and do not use real rhel build 2019-03-01 15:13:54 +02:00
8d6932abb2 fix compiler warnings in tests 2019-02-27 23:57:13 +02:00
0f4e485a1c fix compiler warnings in rds_vpc test 2019-02-27 23:42:15 +02:00
21fc015635 Fix compiler warnings in system tests 2019-02-27 23:15:36 +02:00
cc3dbeeb6c add start and stop VM functions 2019-02-27 22:34:41 +02:00
9de26b6df0 add -DCMAKE_BUILD_TYPE=Debug to run_test_snapshot.sh 2019-02-27 22:22:26 +02:00
41a72bcc30 Fix config parameter related tests
The tests gave null arguments when a valid object was expected.
2019-02-25 17:10:00 +02:00
b0efcea3f6 Remove vagrant lock from build.sh and run_test.sh (#190)
vagrant_lock was created in order to prevent parallel execution of two 'Vagrant up' operations in parallel. Previously it was necessary due to Vagrant internal Chef issue. Now several bugs in Vagrant are fixed and MDBCI uses own Chef to provision nodes for builds and tests. There is no need to wait for previous Vagrant run finished, removing all waiting from all scripts.
'rm vagrant_lock is still present to remove locks created by previous versions of build and test scripts-
2019-02-25 14:22:32 +02:00
2a63fb0776 MXS-2304 Store config parameter container as value in monitor and service 2019-02-22 16:53:17 +02:00
3fa4a85a1e MXS-2304 Use values instead of pointers in CONFIG_CONTEXT
Simplifies ctor/dtor.
2019-02-22 16:39:45 +02:00
2440b48ccc Mxs 2236 own longtest (#189)
MXS-2236 Add own long test and possibility to run tests under Valgrind

Long test executes INSERT queries, transactions, prepared statements in parallel to create weird load on Maxscale to catch crashes and leaks

Test is not included into ctest scope. Test should be executed manually. For BuildBot (and also for run_test.sh) 'test_set' should be set 'NAME# ./long_test'

Time to run test is defined by 'long_test_time' variable (in seconds)

Possibility to run Maxscale under Valgrind is also added. To run Maxscale under Vaslgrind 'use_valgrind=yes' variable have to be defined
2019-02-22 16:12:57 +02:00
ab7c19e1a4 MXS-2294 Update PAM authenticator documentation
Updated with new functionality. Also explains the account mapping more.
2019-02-22 15:31:40 +02:00
5828c93112 MXS-2304 Convert static config parameter methods to non-static
Parameter handling changed in several places.
2019-02-22 15:17:55 +02:00