9753 Commits

Author SHA1 Message Date
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
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
Markus Mäkelä
c24f2c12e6
Fix broken link in the documentation
Fixed the link to MaxScale-Failover-with-Keepalived-and-MaxCtrl.md.
2018-03-09 20:53:56 +02:00
Markus Mäkelä
99dbab27c8
Relocate password encryption documentation
The password encryption was documented in the installation instructions
and the main configuration document referred to it as a "section" in the
same document. Having it in the main configuration document makes it the
authoritative source of information.
2018-03-09 20:53:56 +02:00
Johan Wikman
d443e22d1b Merge branch '2.2.3' into 2.2 2018-03-09 20:50:01 +02:00
Johan Wikman
8c8674dcf8 Update MaxScale 2.2.3 release date 2018-03-09 20:45:00 +02:00
Markus Mäkelä
f4c7a4700a
Disable fix to MXS-1678 in 2.2.3
The fix causes a regression in the failover functionality as there is a
dependency between the slave's master ID and how the failover
performs. This dependency should not exist but fixing it causes a problem
with the mysqlmon_rejoin_bad2 test.
2018-03-08 21:03:52 +02:00
Johan Wikman
3e8f51bbf3 MXS-1705 Make note of workers only after creation
The variable containing the number of workers must be updated
only after the workers have been successfully created.

Failure to do this led to crash in Worker::shutdown_all() if a
terminating signal was received after the worker initialization
had failed.
2018-03-08 15:00:28 +02:00
Johan Wikman
010c1b2625 MXS-1705 Add explanatory comment 2018-03-08 15:00:28 +02:00
Johan Wikman
bf9767e54e MXS-1705 Try with O_DIRECT, if fails try without
Instead of trying to figure out whether the kernel supports O_DIRECT
in conjunction with pipes, let's just use it and if it fails, try
without O_DIRECT.

Case in point, based on circumstantial evidence it seems that in a
container context, it may appear as if the kernel supports O_DIRECT
when it in reality does not. So better to use brute-force.
2018-03-08 15:00:28 +02:00
Markus Mäkelä
e036582a98
Fix typo in readwritesplit log message
The `stmt` label was wrongly set to `pastmt`.
2018-03-08 14:03:46 +02:00
Markus Mäkelä
f54bbdf73b
Fix -Werror=format-truncation= warnings in blr_slave.c
The errors were caused by the fact that the server name
MAX_SERVER_NAME_LEN is 1024 bytes long whereas the buffer was 251 bytes.
2018-03-08 11:28:05 +02:00
Markus Mäkelä
69811d9b19
Cherry-pick: Enable optional use of ASAN
AdressSanitizer is a lightweight memory error detector that instruments at
compile time instead of at execution time. This allows serious memory
errors to be detected without the cost of slowing down the whole program
that often happens when Valgrind is used. It is also easier to enable for
test runs as it is a simple compiler flag.

This is a cherry-pick of fb9b027842a7b65c4826455cd34d88e2f5f28e79 from the
2.2 branch.
2018-03-08 11:28:05 +02:00
dapeng huang
003ad03e8d make libmircohttpd source url configurable (#170) 2018-03-08 10:42:27 +02:00
Johan Wikman
5f328bc017 MXS-1689 Add better error messages
If a listener section specifies both a 'socket' and a 'port' the
creation will fail with a clear error message.

If 'address' and 'socket' is specified, there will be a warning that
the address is meaningless.
2018-03-07 15:25:43 +02:00
Johan Wikman
7ae3931511 MXS-1689 Properly check for duplicate port/socket of service
It is now impossible to create two listeners for a service that
would listen on the same port/socket (as before), but the error
message is now sensible and provides detailed information to the
user.
2018-03-07 15:25:43 +02:00
Johan Wikman
3d7bf5683e Update 2.1 version 2018-03-07 15:21:02 +02:00
Markus Mäkelä
ff9024bdfb
MXS-1698: Remove false debug assertion
It is not an error if the correct GTID is not found and thus it should not
be asserted that one is found.
2018-03-07 11:55:46 +02:00
Markus Mäkelä
d6319ec6ee
MXS-1697: Install pkg-config for Debian systems
The build scripts did not install the pkg-config package that the Avro-C
API depends on.
2018-03-07 10:43:07 +02:00
Markus Mäkelä
187cd2cb79
Make install scripts less verbose
We don't need to know the contents of the tarballs on each build.
2018-03-07 10:43:07 +02:00
Markus Mäkelä
7dc844c38a
Update Travis build script
The actual build scripts for MaxScale are now used to prepare the build
environment. This should make the Travis CI build easier to maintain.
2018-03-07 10:43:07 +02:00
Markus Mäkelä
78abfd67e6
Merge branch '2.1' into 2.2 2018-03-06 16:03:24 +02:00
Markus Mäkelä
ed74f2d4a8
MXS-1697: Install pkg-config for Debian systems
The build scripts did not install the pkg-config package that the Avro-C
API depends on.
2018-03-06 15:58:48 +02:00
Markus Mäkelä
e41f6e0a48
Make install scripts less verbose
We don't need to know the contents of the tarballs on each build.
2018-03-06 15:58:22 +02:00
Markus Mäkelä
115b3fa28f
Update Travis build script
The actual build scripts for MaxScale are now used to prepare the build
environment. This should make the Travis CI build easier to maintain.
2018-03-06 15:58:21 +02:00
Markus Mäkelä
af059e2be5
Increase timeouts and add maxadmin output to mxs1476
Increasing the timeout should remove any issues with server lag and
printing the maxadmin output should help diagnose the problem if it still
fails.
2018-03-06 15:58:20 +02:00
Markus Mäkelä
55276be6f2
MXS-1699: Log progress messages at startup
When MaxScale is starting, the loading of the listeners can take a while
if there are a large number of services and users to load. To signal this
to the user, progress messages should be logged after every service is
started.
2018-03-06 15:56:07 +02:00
Johan Wikman
3fb51a1fe9 Update ChangeLog and Release Notes 2018-03-06 15:49:26 +02:00