Commit Graph

9990 Commits

Author SHA1 Message Date
4d201d28ed Fix broken documentation link 2018-03-13 09:25:47 +02:00
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
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
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
aea9c36498 Merge branch '2.1' into 2.2 2018-03-12 14:38:13 +02:00
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
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
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
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
4c7edc1b68 Remove obsolete note
The user reloading is now done only once.
2018-03-09 20:53:56 +02:00
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
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
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
d443e22d1b Merge branch '2.2.3' into 2.2 2018-03-09 20:50:01 +02:00
8c8674dcf8 Update MaxScale 2.2.3 release date 2018-03-09 20:45:00 +02:00
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
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
010c1b2625 MXS-1705 Add explanatory comment 2018-03-08 15:00:28 +02:00
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
e036582a98 Fix typo in readwritesplit log message
The `stmt` label was wrongly set to `pastmt`.
2018-03-08 14:03:46 +02:00
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
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
003ad03e8d make libmircohttpd source url configurable (#170) 2018-03-08 10:42:27 +02:00
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
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
3d7bf5683e Update 2.1 version 2018-03-07 15:21:02 +02:00
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
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
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
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
78abfd67e6 Merge branch '2.1' into 2.2 2018-03-06 16:03:24 +02:00
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
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
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
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
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
3fb51a1fe9 Update ChangeLog and Release Notes 2018-03-06 15:49:26 +02:00
0a4bb6fe7a 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:11:42 +02:00
49864b64c0 Make install scripts less verbose
We don't need to know the contents of the tarballs on each build.
2018-03-06 15:11:42 +02:00
2fa8c91297 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 14:42:44 +02:00
0366736759 MXS-1683: Use non-interactive mode when terminal setup fails
When the terminal configuration fails, it usually means that no terminal
is attached to the controlling process. This is the case when scripts are
executed automatically by daemon processes. To allow maxadmin use without
a controlling terminal, the editline library functionality must not be
used when the terminal setup fails.

To facilitate this fix, a minor refactoring of the code was done to split
the parts that use editline into separate functions. This allows simple
and easy fallback to non-editline code in the case that editline is
available but the terminal is not interactive.
2018-03-06 13:35:15 +02:00
d5226fa7d1 MXS-1698: Fix double SSL connection
When backend SSL connections were created, the connection creation was
done twice. This was due to the lacking detection of an already
established SSL connection.
2018-03-06 13:35:15 +02:00
86eae02366 Log message on failed worker message
When a worker message fails, an error message should be logged to know why
it failed.
2018-03-06 13:35:15 +02:00
016a6a6bd2 Add more info output to readwritesplit replies
When readwritesplit receives a reply from a backend, an info level log
message is now logged. This allows easier debugging of situations where
replies aren't properly returned by the router.
2018-03-06 13:35:15 +02:00
2df47d8999 Read MaxCtrl password from stdin when none provided
When the -p parameter is given without an argument, the password is read
from the command line. This allows passwords to be given to MaxCtrl in a
safer manner.
2018-03-06 13:35:14 +02:00
b8df0dfc02 Print actual command on bad command
When a bad command is given, print the actual command.
2018-03-06 13:35:14 +02:00
73de112ae4 MXS-1683: Allow MaxAdmin use without controlling tty
When MaxAdmin would be used without a controlling terminal, it would
refuse to accept passwords from stdin as it could not set the terminal
attributes. This means that executing MaxAdmin commands from other
programs would fail if the process had no controlling terminal.

Turning the error into a warning will allow users to know that terminal
echo is still enabled before they type their passwords.
2018-03-06 13:35:14 +02:00
82839abc38 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 12:47:20 +02:00
b619fb0707 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 12:47:20 +02:00
8bfb4f231a Merge branch '2.1' into 2.2 2018-03-06 10:38:01 +02:00