9455 Commits

Author SHA1 Message Date
Johan Wikman
beac04b8e7 MXS-1616 Also use 'value' in partial matching
As you can create regular expressions that have a fixed length,
e.g. "....$", it makes perfect sense to replace using 'value' if
the length of the string matches exactly.
2018-01-18 09:48:38 +02:00
Markus Mäkelä
47184ea46d Fix build failure on Ubuntu 17.10
The sprintf calls failed due to a warning about possible buffer
overflow. Curiously enough, the same warnings do appear on Fedora 26 but
only when the calls are changed to snprintf.
2018-01-17 14:06:19 +02:00
Johan Wikman
c02da103d7 MXS-1615 Fix access of wrong argument
- Wrong argument accessed at command invocation. In debug mode
  leads to crash, in release mode probably leads to crash.
- Log result of reload.
2018-01-17 13:59:00 +02:00
Esa Korhonen
a4f6176ced Fix bug in printing switchover/failover module command info
The string constant passed to the register-function went invalid
once CREATE_MODULE() completed, causing random characters to be
printed.
2018-01-17 12:01:00 +02:00
Esa Korhonen
ae949881a9 MXS-1511: Add documentation about new parameters 2018-01-17 10:21:50 +02:00
Esa Korhonen
b8e15d2bea Reformat and tune QLA filter documentation
No additions, just tidying up.
2018-01-17 10:21:50 +02:00
Esa Korhonen
23f2c3b980 Better failover timing and redirection success is tested
Works similar to switchover.
2018-01-16 18:05:12 +02:00
Johan Wikman
dbbeeac145 MXS-1596 Use non-privileged user for client
The pre-existing users in the MaxScale test environment have
the super privilege so they are not affected by the database
being set in read-only mode.

Consequently, a custom user without the super privilege must
be used by the client threads.
2018-01-16 16:08:13 +02:00
Esa Korhonen
71f74ea0d2 Add warning about SUPER-users to Switchover Limitations documentation 2018-01-16 15:59:39 +02:00
Esa Korhonen
1d211ecee2 MXS-1511: QLA-Filter replace newlines in SQL-queries with custom strings
The config parameter 'newline_replacement' (defaults to 1 space " ") now defines
what to write to the log file when the sql-query has a newline sequence (\n, \r or
\r\n). If 'newline_replacement' is the empty string "", no replacing is done and
newlines are printed to file.

Also, adds the config parameter 'separator', which defines the string
printed between elements. Default value is ",".
2018-01-16 14:25:19 +02:00
Esa Korhonen
c2c898ee93 Fix formatting in MariaDB Monitor 2018-01-16 13:27:20 +02:00
Esa Korhonen
ff2ad05d0a Add manual rejoin command to MariaDB Monitor
The rejoin command takes as parameters the monitor name and
name of server to rejoin.

This change required refactoring the rejoin code.
2018-01-16 13:20:35 +02:00
Johan Wikman
bf02571f45 MXS-1596 Test switchover under stress
- Start 4 threads where each thread sits in a loop and performs
  20% updates and 80% selects. Each thread has a table of its own.
- The main thread executes the following in a loop.
- Perform a switchover from the current master to the next (which is
  simply the next node % all nodes).
- Keep on doing that for 1.5 minutes.

The expectation is that the switchover will succeed, that is, after the
operation there will be a new master.
2018-01-16 10:31:27 +02:00
Markus Mäkelä
0afe10ffb9 Merge branch '2.1' into 2.2 2018-01-16 09:47:49 +02:00
Markus Mäkelä
76e53f2081 Make contribution instructions more concise
The instructions now separate the two parts more clearly so that bug fixes
are always done to the oldest possible version.
2018-01-16 09:37:20 +02:00
Dapeng Huang
454f195cb0 fix:cannot connect to maxinfo with python client 2018-01-16 09:02:03 +02:00
Dapeng Huang
2b653887a3 fix crash at execute empty flush command 2018-01-16 08:40:22 +02:00
Timofey Turenko
8dfc1a141d fix typo in read_env() and set_env.sh 2018-01-15 17:17:44 +02:00
Timofey Turenko
847dd2c120 fix typo in read_env() and set_env.sh 2018-01-15 16:47:15 +02:00
Markus Mäkelä
ab44a941ab MXS-1575: Fix large DECIMAL value handling
DECIMAL types that were larger than 8 bytes were not handled
correctly. The current implementation only prints the lowest 8 bytes of
the integer part of the decimal.
2018-01-15 16:15:20 +02:00
Markus Mäkelä
9ca6d586d1 MXS-1575: Fix Avro schema versioning
The versions were not updated if the table was dropped and created again.
2018-01-15 16:15:20 +02:00
Markus Mäkelä
dbad6b737d Detect redundant table map events
When two identical tables are mapped into the same slot, the newer one is
ignored.
2018-01-15 16:15:20 +02:00
Markus Mäkelä
5e4b7ae7c7 Fix memory leak in avrorouter
The TABLE_MAP freeing function leaked memory.
2018-01-15 16:15:20 +02:00
Markus Mäkelä
f2771d5ad8 Remove obsolete message
The warning that a schema already exists is obsolete as mapped tables are
now always opened instead of being reused. This causes the schema checks
to be done for each mapped table.
2018-01-15 16:15:19 +02:00
Markus Mäkelä
a44e352f4f Fix default protocol module names for objects
If either a server or a listener was created at runtime, it would use the
old protocol module name and log a warning.
2018-01-15 16:14:50 +02:00
Markus Mäkelä
f167bc5f02 Update example configuration
Updated links and module names in the configuration. Also changed object
names so that they don't produce warnings. Removed redundant parameters
and tuned default monitor_interval to a slightly more reasonable 2000
milliseconds. Enabled automatic thread number configuration.
2018-01-15 16:14:50 +02:00
Markus Mäkelä
f6f34ad7e5 Fix debug build failure on CentOS 6
The build failed due to a comparison between signed and unsigned integers.
2018-01-15 16:14:50 +02:00
Esa Korhonen
14f1bbed51 NamedServerFilter: Deprecate message for legacy parameter use 2018-01-15 15:30:38 +02:00
Johan Wikman
ad634fe31e MXS-1596 Stress test for failover
- Start 4 threads where each thread sits in a loop and performs
  20% updates and 80% selects. Each thread has a table of its own.
- The main thread executes the following in a loop.
  - Take down the current master and wait a while (failover assumed
    to happen).
  - Put up the old master node and wait a while.

Keep on doing that for 1.5 minutes.

At the end check that:
- There is one 'Master'.
- The other nodes are either
  - 'Slave' or
  - 'Running' in which case it is checked it is because the node could
    not be rejoined.
2018-01-12 15:56:52 +02:00
Johan Wikman
1e5125015e Add convenience functions to TestConnections 2018-01-11 10:33:57 +02:00
Johan Wikman
da428f325c Update release date of 2.2.1 2018-01-11 10:30:57 +02:00
Esa Korhonen
eda8288161 Rename and fix test
Test now tries to reset the servers when successful.
Still seems to rarely fail.
2018-01-10 15:25:58 +02:00
Markus Mäkelä
96a8d20439 Reduce binlog_change_master output
The output was very verbose and did not provide a lot of information. This
made it hard to see what is going on in the test.
2018-01-10 15:08:06 +02:00
Markus Mäkelä
f54038f378 Process module command output even on errors
The output generated by a failed call to a module command was previously
overwritten with the error messages stored in the module command
subsystem.

In the case of a failure, the proper procedure is to check if the output
generated by the module command conforms to the JSON API error
specification and if it does, combine it with any system generated error
messages. If the output does not conform, it is stored in the "meta" field
of the returned object. This allows all of the generated output to be
saved.
2018-01-10 15:08:06 +02:00
Johan Wikman
e08d42e61e Update MariaDB Monitor tutorial 2018-01-10 13:46:06 +02:00
Johan Wikman
383ed2d255 Add MariaDB Monitor Failover Tutorial 2018-01-10 13:33:08 +02:00
Markus Mäkelä
d8e41a6408 Fix release note ordering
Moved the binlogrouter section under the correct heading.
2018-01-10 13:00:31 +02:00
Markus Mäkelä
c6f7f22117 Use comma separated lists in MaxCtrl options
Using commas instead of spaces prevents a the misinterpretation of
commands as hostnames. If the `--hosts` option was given just before a
command, it would consume the commands as arguments to the `--hosts` list.
2018-01-10 13:00:31 +02:00
Johan Wikman
882f1d719a Update 2.2 change log, release notes and upgrading doc
Links to release notes removed from upgrading doc. It refers to
the change log where the links to the release notes are found.
2018-01-09 15:28:16 +02:00
Johan Wikman
990ca48ddc Reduce worker output
Some MXS_NOTICE changed into MXS_INFO
2018-01-09 15:28:16 +02:00
Markus Mäkelä
6ee5307624 Only pre-seed asynchronous authenticators
Only asynchronous authenticators require the thread-specific loading of
users as the synchronous ones all share the same data. If the service does
not declare asynchronous capabilities at startup, the users are not
seeded. This prevents unnecessary loading of users at startup.
2018-01-09 13:59:12 +02:00
Johan Wikman
a4dc99d07c Reset situation after test
If node00 is not the master when a test is started, the cleanup
performed by TestConnections takes considerable time.

By restoring the sitation back to normal before ending the test,
the startup time of the next test can be shortened significantly.
2018-01-09 12:48:49 +02:00
Johan Wikman
a4c4c26ab9 Increase timeouts of mysqlmon_switchover
With default timeouts test failed on max-tst-01
2018-01-09 12:48:49 +02:00
Markus Mäkelä
eff88f7126 Disable detect_standalone_master in replication template
The template is used by tests that expect the functionality to be
disabled.
2018-01-09 10:57:18 +02:00
Markus Mäkelä
d1944d015d Verify that connections fail in bug547
The test assumed that the connections failed but it did not check that it
actually did.
2018-01-09 10:57:18 +02:00
Markus Mäkelä
79b84934b9 Document tee filter limitations
Added the tee filter into the limitations document.
2018-01-09 10:57:18 +02:00
Markus Mäkelä
facecc2dcd Make sure double DCB closes are detected
Crashing after a double close makes sure it is properly detected in debug
builds.
2018-01-09 10:57:18 +02:00
Markus Mäkelä
e36e506f32 MXS-1418: Fix regression
Removing a server from readconnroute caused the connection to be closed if
it was a master server.
2018-01-08 21:49:19 +02:00
Esa Korhonen
5fda35a998 Properly disable server settings
In the config files, spaces in setting names can be either with
_ or -, so need to disable both versions.
2018-01-08 16:15:31 +02:00
Esa Korhonen
5f4db64ac7 Better timing for switchover, check slaves for IO/SQL errors
Time elapsed is now properly tracked during a switchover. After slave
redirection, an event is added to the master. Then, the slaves are queried
repeatedly until they advance to the newest event. I/O and SQL errors are
also detected.
2018-01-08 15:23:25 +02:00