9779 Commits

Author SHA1 Message Date
Johan Wikman
2cc0c5f1aa Merge branch '2.1' into 2.2 2018-03-21 11:24:41 +02:00
Johan Wikman
cb3a6a0e11 Merge branch '2.1.15' into 2.1 2018-03-21 11:23:28 +02:00
Johan Wikman
dadfb68a70 Update 2.1.15 release date. 2018-03-21 11:17:58 +02:00
Markus Mäkelä
0b89bc167a
Correct listener port and socket documentation
Remove the old paragraph and added a note about defining separate
listeners for UNIX domain sockets and network ports.

Also fixed the example listener definition.
2018-03-20 13:07:28 +02:00
Markus Mäkelä
39dff20a0a
Use correct callback function in MySQLAuth
The JSON diagnostics function used the non-JSON version of the callback.
2018-03-20 13:07:27 +02:00
Markus Mäkelä
dcf9d7f152
Fix calls to diagnostics_json
Add missing listener JSON diagnostics call. Check that the
diagnostics_json function exists before calling it.

As the protocol modules don't have diagnostics functions, they aren't
called.

Replace hard-coded strings with constant parameters. This makes it
slightly cleaner.
2018-03-20 13:07:27 +02:00
Markus Mäkelä
94f29a11c5
MXS-1724: Reimplement core dump detection
Reimplemented the core dump detection for 2.2.
2018-03-20 13:06:20 +02:00
Markus Mäkelä
b0e0a79b46
Merge branch '2.1' into 2.2 2018-03-20 12:38:23 +02:00
Markus Mäkelä
28e4133669
Add missing jansson dependency on maxscale-common
The Jansson library must be built or must exist before MaxScale.
2018-03-20 12:35:06 +02:00
Markus Mäkelä
02368473f7
Fix failover_mysqlmon
The test should stop MaxScale when it is fixing the replication to prevent
the triggering of the standalone master detection.

Also removed leading spaces from the messages and fixed a possible crash with a
NULL value given to `ssh_node`.
2018-03-20 10:59:08 +02:00
Markus Mäkelä
64ccb67897
Mark crashing tests as failed
If a test generates a core dump, it is marked as a failure.
2018-03-20 10:59:08 +02:00
Johan Wikman
2dacd0c9a4 Add Changelog and Releasenotes to 2.1.15 2018-03-20 09:29:53 +02:00
Esa Korhonen
aa260cf6cf MXS-1716 Reduce the amount of duplicate elements in users db for PAM
The database-level query now only takes rows with either a global
select privileges or non-null database privileges. The table-level
query only accepts non-null databases and no global privileges,
as users with global select are added by the previous section.
2018-03-19 15:09:36 +02:00
Esa Korhonen
04666b4b31 MXS-1716 Add diagnostic functions to PAM Authenticator
The functions print the user information. Normal version just prints
user@host, the json-version prints the whole array.
2018-03-19 11:02:14 +02:00
Timofey Turenko
022c226d4b
Mxs 1665 keepalived masterdown test (#171)
* add keepalived_masterdown test

* add missing cnfs
2018-03-16 15:14:14 +02:00
Johan Wikman
391ec78a0b MXS-1721 Destroy a filter instance only once
If two services referred to the same filter instance, it would
cause the filter to deleted twice at MaxScale shutdown with a
crash as the result.

Now when the services are deleted we just collect the unique
filter instances and then delete them after all services have
been deleted.
2018-03-16 12:00:18 +02:00
Esa Korhonen
2178667245 MXS-1679 Check for existence of master before continuing failover checks
Seems to fix the issue with MaxScale detecting an old master down event.
2018-03-16 11:26:58 +02:00
Markus Mäkelä
dad8e5da59
Sync slaves after creating tables in rwsplit_readonly
The test should synchronize the replication to avoid replication lag from
breaking the tests.
2018-03-15 23:24:08 +02:00
Markus Mäkelä
07cca088c9
MXS-1717: Fix test regressions
Due to the changes done for MXS-1717, the bug673 test had to be adjusted
and a newline has to be printed after users_diagnostic is called.
2018-03-15 23:23:15 +02:00
Markus Mäkelä
d7c1d76065
Merge branch '2.1' into 2.2 2018-03-14 14:29:56 +02:00
Markus Mäkelä
f5e2870c83
Rearrange tutorial sections
The sections are now ordered so that a later section always refers to an
earlier section and not the other way around.
2018-03-14 13:02:50 +02:00
Markus Mäkelä
bbe57a58cb
Move server creation into a mini-tutorial
Combined the redundant documentation into a single document.
2018-03-14 13:02:50 +02:00
Markus Mäkelä
36c960a141
Add helper functions and default parameters
Added some helper functions into the MaxScale class and default parameters
into the connection creation functions. Also made the ip() function const
correct.
2018-03-14 13:02:50 +02:00
Markus Mäkelä
464d52453b
Add disconnect as an alias for close_connections
This way both MaxScale and backend connections have the same function
names.
2018-03-14 13:02:49 +02:00
Markus Mäkelä
60ad1bccc5
Remove old tutorials
Removed obsolete tutorials.
2018-03-14 13:02:49 +02:00
Markus Mäkelä
ae49eb0cba
Update links in Documentation-Contents.md
Updated links to point to the new tutorials.
2018-03-14 13:02:49 +02:00
Markus Mäkelä
91e13d2c9a
Update MaxScale-Tutorial.md
Made the document more concise and added links to the download page. Made
the user grants easier to copy-paste and explained that they are used in
the following tutorials. Updated the links to the new tutorials.
2018-03-14 13:02:49 +02:00
Markus Mäkelä
fe2dfe03f4
Create combined read-write splitting routing tutorial
The read-write splitting routing tutorial is a combination of the two
different read-write splitting routing tutorials. As with the connection
routing tutorial, this should reduce the maintenance burden.
2018-03-14 13:02:49 +02:00
Markus Mäkelä
b4ac1b4d07
Create combined connection routing tutorial
The connection routing tutorial is a combination of the two different
connection routing tutorials. This should reduce the maintenance burden by
a significant amount.
2018-03-14 13:02:48 +02:00
Markus Mäkelä
2f95532efd
Combine MaxAdmin tutorials
Combined all maxadmin related tutorials into one document. This removes
the duplication of documentation found in all tutorials.
2018-03-14 13:02:48 +02:00
Markus Mäkelä
b7d19a6670
Clean up connection routing tutorials
Wrapped lines to 80 characters, fixed minor differences and reworded
sections so that they are identical.
2018-03-14 13:02:47 +02:00
Markus Mäkelä
944d47167f
Create mini-tutorials for monitor and server configuration
The tutorials combine the Galera and MariaDB monitor configuration as well
as the server configuration sections that were duplicated for all
tutorials. This should make the documentation easier to maintain.
2018-03-14 13:02:47 +02:00
Markus Mäkelä
2023ee4dc7
MXS-1713: Fix resultset collection code
The resultset collection was not detected early enough in the code which
caused partial results to be returned to the router.
2018-03-14 13:02:47 +02:00
Markus Mäkelä
2856b91077
Sync slaves before starting the test
Syncing the slaves should guarantee that the table exists on all servers.
2018-03-13 15:17:18 +02:00
Markus Mäkelä
a75ea27a96
Fix memory leak when backend authentication fails
If the backend authentication failed for a user, the buffer containing the
error packet would leak.
2018-03-13 14:32:38 +02:00
Markus Mäkelä
050e27685e
Add various build script documents
Added documents that were left over from the build scripts repo.
2018-03-13 11:37:10 +02:00
Johan Wikman
ff13fa633e Update .gitignore 2018-03-13 11:15:44 +02:00
Johan Wikman
633b08ed0d MXS-1717 Show which listener users are coming from
Earlier, if a service had multiple listeners you would have had

   MaxScale> show dbusers MyService
   User names: alice@% ...
   User names: bob@% ...

That is, no indication of which listener is reporting what. With
this commit the result will be

   User names (MyListener1): alice@% ...
   User names (MyListener2): bob@% ...

Further, the diagnostics function of an authenticator is now expected
to write the list of users to the provided DCB, without performing any
other formatting. The formatting (printing "User names" and appending
a line-feed) is now handled by the handler for the MaxAdmin command
"show dbusers".
2018-03-13 10:25:42 +02:00
Johan Wikman
78123a0333 Merge branch '2.2.3' into 2.2 2018-03-13 09:32:08 +02:00
Johan Wikman
4d201d28ed Fix broken documentation link 2018-03-13 09:25:47 +02:00
Esa Korhonen
b982458497 MXS-1679 Add more accurate error printing
The reason for rejoin failing should now be clearer.
2018-03-12 17:16:54 +02:00
Markus Mäkelä
b8bf0e4ba5
Add statement timeout to mxs1585
Timing out the statements and adding a LIMIT clause to the DELETE
statement should rule out backend server related problems. If the test
still times out, the problem is most likely in MaxScale.
2018-03-12 14:55:54 +02:00
Markus Mäkelä
5a62adc63e
MXS-1678: Detect broken replication with Last_IO_Errno
This commit introduces changes that fix the relay master detection that
was broken by the merge from 2.1 into 2.2 by commit
1ecd791887994209eb29e56e1271f8c407cd0cdf.

In 2.2, the master server ID is used to detect whether a slave is actually
replicating from a master. The value is still displayed even if the slave
is not actively replicating from a master. The commit in 2.1 causes this
value to be stored unconditionally if it is available. By checking the
value of Last_IO_Errno and comparing it to a list of known error codes, we
know whether the slave is replicating properly.

The slave detection in 2.2 correctly identifies a broken slave with a
stopped IO thread. Due to this, the test case must be modified to check
that the relay master is not a slave if the IO thread is stopped.
2018-03-12 14:55:54 +02:00
Johan Wikman
aea9c36498 Merge branch '2.1' into 2.2 2018-03-12 14:38:13 +02:00
Johan Wikman
c5345d34ca MXS-1714 Use local_address also with MaxScale connections
If local address has been specified, then all connections created
using mxs_mysql_real_connect() will use that same local address as
well.

A system test has not been created as our VMs do not have more than
one usable IP-address. Locally it has been verified to work as
expected.
2018-03-12 11:35:46 +02:00
Markus Mäkelä
f34cdc5607
Increase sleep in mxs812_2
The test appears to fail due to connection errors when it attempts to
check whether MaxScale is still alive. To offset the chance of the backend
server still refusing connections after the initial spike, the sleep
before the check was increased.
2018-03-09 20:56:00 +02:00
Markus Mäkelä
c5fef74f3f
Use common functions in mxs1678_relay_master
The code had a note in that states that the test uses custom code
backported from 2.2 and that it should be updated to use common code once
merged into 2.2.

Added a small sleep to make sure the monitor picks up the changes in the
topology.
2018-03-09 20:53:56 +02:00
Markus Mäkelä
f7b284bbb7
Check IO thread status when verifying master failure
When MaxScale thinks that the master has failed, it tries to verify it by
seeing if the slave server is receiving events. There was a missing IO
thread status check in the slave_receiving_events function which caused
the failover to wait until the verification timed out.

The relay master detection logic also lacked a check for the slave SQL
thread status. The code should check the state of the SQL thread to
determine whether the server is actually a functional slave to a master.
2018-03-09 20:53:56 +02:00
Markus Mäkelä
4c7edc1b68
Remove obsolete note
The user reloading is now done only once.
2018-03-09 20:53:56 +02:00
Markus Mäkelä
ea2da89743
Fix tutorial configurations
Removed the `socket` options from the network listeners.

Updated wording for the listener sections to only mention network
ports. This makes the tutorial more concise.
2018-03-09 20:53:56 +02:00