9444 Commits

Author SHA1 Message Date
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
Esa Korhonen
68ab6ea7e0 Disable log_slave_updates on failover tests
Some test environments may have the setting enabled. It should be
disabled on server3 to get consistent results.
2018-01-08 15:22:47 +02:00
Johan Wikman
f2a4db53e1 Remove 2.1 release notes from 2.2 2018-01-08 14:35:01 +02:00
Johan Wikman
398dbbc66d Update 2.1 version number 2018-01-08 14:28:13 +02:00
Markus Mäkelä
a8876fbcb8 Add CONTRIBUTING document and pull request template
These templates allow for easier pull requests.
2018-01-08 14:07:31 +02:00
Esa Korhonen
ad9b29600f MariaDB Monitor documentation: clarify replication_password encryption 2018-01-08 13:41:23 +02:00
Markus Mäkelä
e5d9ca4af8 Check if master reference is disabled
If a Backend is closed, the associated DCB is no longer valid. This needs
to be taken into account when the stored master reference is used.
2018-01-08 12:14:30 +02:00
Markus Mäkelä
0416d66bcb Set query classifier with an absolute path in tests
Setting the query classifier with an absolute path makes it easier to
manage test setup without having to manually resolve the relative path to
the query classifier from the test source directory.
2018-01-08 09:41:24 +02:00
Markus Mäkelä
579dca0750 Log to stdout in unit tests
The log manager will log to stdout to work around directory and file
permissions.
2018-01-05 16:12:54 +02:00
Markus Mäkelä
3f78dbc923 Improve avrorouter assertion output
When an assertion fails due to an overflow of the event buffer, all
processed values for that event are dumped.

This commit also enables the assertions even for non-debug builds which
should speed up the elimination process for bugs in the avrorouter. The
overhead of doing this is minimal as the output is already gathered for
the INFO level logging.
2018-01-05 13:39:57 +02:00
Markus Mäkelä
e5b5303137 Initialize the query classifier in tests
The test initialization function now loads the query classifier.
2018-01-05 12:57:09 +02:00
Markus Mäkelä
ce1c45828a MXS-1575: Fix CREATE TABLE processing
The CREATE TABLE processing failed to identify the explicit database names
that were generated by mysqldump.
2018-01-05 12:50:39 +02:00