Commit Graph

9799 Commits

Author SHA1 Message Date
c2341a0003 MXS-359: Allow master changes mid-session
With the `allow_master_change` parameter enabled, sessions can start using
a different master node if one is available. This will not prevent
sessions from closing if a write query is received while no master
replacement is available.
2018-03-08 11:19:17 +02:00
b18207282d MXS-1703: Remove unused functions & old comments
Made obsolete with previous refactoring.
2018-03-07 14:18:09 +02:00
d17c3b8ab7 Cast to uint before comparing
Fixes compilation error.
2018-03-07 13:32:42 +02:00
728817b001 MXS-1703: Move fail/switch/rejoin functions to class
Most of the related functions are now class methods in a dedicated file.
2018-03-07 13:26:31 +02:00
87911dc6b0 MXS-1703: refactor startup & shutdown
Startup now done in a static method. Constructor initializes some values.
Config parameters loaded in a separate method. Some things still need
looking.
2018-03-07 13:26:24 +02:00
7a505d9976 MXS-1703: Move replication manipulation functions to a separate file
Refactoring continues. This update moves some of the replication manipulation
functions to a separate file and turns them into class methods.
2018-03-07 13:26:14 +02:00
173f44b351 MXS-1703: Move additional classes to separate file
Also use stl containers in monitor definition.
2018-03-07 13:26:02 +02:00
8ef1385d1a MXS-1703: Turn MariaDB Monitor struct to class with public fields
Allows using std::string for strings. Also, cleanup.
2018-03-07 13:25:52 +02:00
1de8f5ffdc MXS-1703: Compile mariadbmon.h as C++ 2018-03-07 13:25:29 +02:00
35232d8ad8 MXS-1703: Use dedicated header in NDBClusterMon
NDBClusterMonitor used the MariaDBMonitor header instead of its own.
2018-03-07 13:24:45 +02:00
82bb624981 MXS-1690: Need Backpressure mechanism (#169)
* implication of backpressure

* fix typo and refactor

* misc refactor

* misc fix

* add function session_unlink_backend_dcb and more comments

* misc fix

* refactor, move all throttling logic into dcb.cc

* misc fix

* misc fix
2018-03-07 12:34:47 +02:00
d6b8147119 Merge branch '2.2' into develop 2018-03-06 17:02:03 +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
8232c5d449 Merge branch '2.2' into develop 2018-03-06 10:38:54 +02:00
8bfb4f231a Merge branch '2.1' into 2.2 2018-03-06 10:38:01 +02:00
9144ed3448 Update 2.1.14 Release Date 2018-03-06 09:45:41 +02:00
a0c890cdf6 Add maxadmin output to mxs1678_relay_master
This should make test failure analysis easier.
2018-03-05 14:02:41 +02:00
cab827b0a4 Fix replication after failover_mysqlmon
When the test finishes and is about to check whether MaxScale is alive,
the servers should be cleared from maintenance mode and the replication
should be fixed. This way the test will clean up after itself.
2018-03-05 14:02:41 +02:00
65216f5e16 Reset slave when changing master
When the test changes the master, it should reset the slave configuration
on the new master. This way no circular replication topologies are formed
and the monitor can be expected to perform correctly.
2018-03-05 14:02:41 +02:00
019312c4ee Cherry-pick: Don't write errors to dummy sessions
If a DCB is closed before a response to the handshake packet is received,
the DCB's session will point to the dummy session. In this case no error
should be written to the DCB.

This is a cherry-pick of commit f53e112bf49766f1cc55516c2d7ee571461d483f
from the 2.2 branch.
2018-03-05 13:58:09 +02:00
93f3529bb4 MXS-1697: Treat missing libraries as an error
If the avrorouter is being build and the required libraries are not found,
the configuration process should fail. Adding the command to bypass this
into the error message should make it easier to disable this part if it is
not needed.
2018-03-05 13:58:09 +02:00
f066ba8753 MXS-1693: Accept 'mysql_native_password' as plugin name
When the authenticator loads users, it should also accept users who have
explicitly defined 'mysql_native_password' as their authentication plugin.
2018-03-05 13:58:09 +02:00
e5934dfb11 Expand SHOW DATABASES warning message
The message now states the impliciations of missing permissions. If the
MaxScale user does not have the permissions to view all databases, it will
only see its own databases.
2018-03-05 13:58:09 +02:00
deae7ea922 add system update before build to build script 2018-03-05 13:17:17 +02:00
c78eb298d8 Update ChangeLog and ReleaseNotes of 2.1.14 2018-03-05 12:58:44 +02:00
ea83420620 Merge branch '2.2' into develop 2018-03-01 18:08:45 +02:00
544e0eb60b Merge branch '2.1' into 2.2 2018-03-01 17:57:40 +02:00
b46c52d65c MXS-1684 Match space+linefeed as linefeed
A linefeed is whitespace, so given the rules

  "\n"+    return '\n'
  {SPACE}  ;

a line consisting of space followed by a linefeed, will be matched
as space and not as a linefeed and hence will cause the parser to
barf.
2018-03-01 17:57:07 +02:00
39d3c42c94 Merge branch '2.1' into 2.2 2018-03-01 17:52:42 +02:00
0c206ff428 MXS-1688 Handle ...INTERVAL N <unit>
"INTERVAL N <unit>" is now handled as an expression in itself and
as asuch will cause both statements such as

  "SELECT '2008-12-31 23:59:59' + INTERVAL 1 SECOND;"

and

  "select id from db2.t1 where DATE_ADD("2017-06-15", INTERVAL 10 DAY) < "2017-06-15";"

to be handled correctly. The compare test program contains some
heuristic checking, as the the embedded parser will in all cases
report date manipulation as the use of the add_date_interval()
function.
2018-03-01 17:39:03 +02:00
b7cc793c40 MXS-1688 Add test that reveals DATE_ADD problem 2018-03-01 17:39:03 +02:00
a197e6c859 Remove unnecessary code
A descriptor is always added to the global epoll instance or
to a specific worker, never just to _any_ worker.
2018-02-28 20:11:27 +02:00