From c78eb298d8c309f5cd6b0fcbbe529b351ff18c44 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Mon, 5 Mar 2018 12:42:07 +0200 Subject: [PATCH 01/10] Update ChangeLog and ReleaseNotes of 2.1.14 --- Documentation/Changelog.md | 1 + .../Release-Notes/MaxScale-2.1.14-Release-Notes.md | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/Documentation/Changelog.md b/Documentation/Changelog.md index 50fff046b..8fd9dfbb9 100644 --- a/Documentation/Changelog.md +++ b/Documentation/Changelog.md @@ -21,6 +21,7 @@ * MaxScale now supports IPv6 For more details, please refer to: +* [MariaDB MaxScale 2.1.14 Release Notes](Release-Notes/MaxScale-2.1.14-Release-Notes.md) * [MariaDB MaxScale 2.1.13 Release Notes](Release-Notes/MaxScale-2.1.13-Release-Notes.md) * [MariaDB MaxScale 2.1.12 Release Notes](Release-Notes/MaxScale-2.1.12-Release-Notes.md) * [MariaDB MaxScale 2.1.11 Release Notes](Release-Notes/MaxScale-2.1.11-Release-Notes.md) diff --git a/Documentation/Release-Notes/MaxScale-2.1.14-Release-Notes.md b/Documentation/Release-Notes/MaxScale-2.1.14-Release-Notes.md index 80b3ca07f..26eea2459 100644 --- a/Documentation/Release-Notes/MaxScale-2.1.14-Release-Notes.md +++ b/Documentation/Release-Notes/MaxScale-2.1.14-Release-Notes.md @@ -44,13 +44,22 @@ for [details](../Getting-Started/Configuration-Guide.md#local_address). [Here is a list of bugs fixed in MaxScale 2.1.14.](https://jira.mariadb.org/issues/?jql=project%20%3D%20MXS%20AND%20issuetype%20%3D%20Bug%20AND%20status%20%3D%20Closed%20AND%20fixVersion%20%3D%202.1.14) +* [MXS-1688](https://jira.mariadb.org/browse/MXS-1688) Some date functions are not parsed properly with schemarouter +* [MXS-1684](https://jira.mariadb.org/browse/MXS-1684) Empty space on a line in rule file confuses dbfwfilter which refuses to start +* [MXS-1678](https://jira.mariadb.org/browse/MXS-1678) Stopping IO thread on relay master causes it to be promoted as master +* [MXS-1669](https://jira.mariadb.org/browse/MXS-1669) maxadmin show threads counters are probably incorrect +* [MXS-1661](https://jira.mariadb.org/browse/MXS-1661) Excessive logging by MySQLAuth at authentication error (was: MySQLAuth SQLite database can be permanently locked) +* [MXS-1660](https://jira.mariadb.org/browse/MXS-1660) Failure to resolve hostname is considered an error * [MXS-1627](https://jira.mariadb.org/browse/MXS-1627) MySQLAuth loads users that use authentication plugins +* [MXS-1621](https://jira.mariadb.org/browse/MXS-1621) ALTER TABLE with AFTER keyword doesn't work * [MXS-1620](https://jira.mariadb.org/browse/MXS-1620) CentOS package symbols are stripped * [MXS-1602](https://jira.mariadb.org/browse/MXS-1602) cannot connect to maxinfo with python client * [MXS-1601](https://jira.mariadb.org/browse/MXS-1601) maxinfo crash at execute query 'flush;' * [MXS-1600](https://jira.mariadb.org/browse/MXS-1600) maxscale it seen to not coop well with lower-case-table-names=1 on cnf * [MXS-1576](https://jira.mariadb.org/browse/MXS-1576) Maxscale crashes when starting if .avro and .avsc files are present +* [MXS-1575](https://jira.mariadb.org/browse/MXS-1575) maxscale crashed with Avro conversion service * [MXS-1543](https://jira.mariadb.org/browse/MXS-1543) Avrorouter doesn't detect MIXED or STATEMENT format replication +* [MXS-1534](https://jira.mariadb.org/browse/MXS-1534) Avrorouter not functioning * [MXS-1416](https://jira.mariadb.org/browse/MXS-1416) maxscale should not try to do anything when started with --config-check ## Packaging From deae7ea922208343b357097590b5f4debe203e0f Mon Sep 17 00:00:00 2001 From: Timofey Turenko Date: Mon, 5 Mar 2018 13:17:17 +0200 Subject: [PATCH 02/10] add system update before build to build script --- BUILD/install_build_deps.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BUILD/install_build_deps.sh b/BUILD/install_build_deps.sh index 9fb10ecfd..6ab74f973 100755 --- a/BUILD/install_build_deps.sh +++ b/BUILD/install_build_deps.sh @@ -25,6 +25,8 @@ else if [ $? != 0 ] then # We need zypper here + sudo zypper -n refresh + sudo zypper -n update sudo zypper -n install gcc gcc-c++ ncurses-devel bison glibc-devel libgcc_s1 perl \ make libtool libopenssl-devel libaio libaio-devel flex libcurl-devel \ pcre-devel git wget tcl libuuid-devel \ @@ -39,6 +41,7 @@ else else # YUM! sudo yum clean all + sudo yum update -y sudo yum install -y --nogpgcheck gcc gcc-c++ ncurses-devel bison glibc-devel \ libgcc perl make libtool openssl-devel libaio libaio-devel libedit-devel \ libedit-devel libcurl-devel curl-devel systemtap-sdt-devel rpm-sign wget \ From e5934dfb11c7e06d96501f34b1f23c4c2c5e2e85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Thu, 1 Mar 2018 16:50:01 +0200 Subject: [PATCH 03/10] 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. --- server/modules/authenticator/MySQLAuth/dbusers.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/modules/authenticator/MySQLAuth/dbusers.c b/server/modules/authenticator/MySQLAuth/dbusers.c index 8829e5170..74b45a63c 100644 --- a/server/modules/authenticator/MySQLAuth/dbusers.c +++ b/server/modules/authenticator/MySQLAuth/dbusers.c @@ -638,7 +638,8 @@ static bool check_server_permissions(SERVICE *service, SERVER* server, if (row && strcasecmp(row[0], "Y") != 0) { - MXS_WARNING("[%s] User '%s' is missing the SHOW DATABASES privilege.", + MXS_WARNING("[%s] User '%s' is missing the SHOW DATABASES privilege. " + "This means that MaxScale cannot see all databases and authentication can fail.", service->name, user); } From f066ba8753eada1c7aa720f14e00025b049d4899 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Fri, 2 Mar 2018 16:24:58 +0200 Subject: [PATCH 04/10] 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. --- server/modules/authenticator/MySQLAuth/dbusers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/modules/authenticator/MySQLAuth/dbusers.c b/server/modules/authenticator/MySQLAuth/dbusers.c index 74b45a63c..af8bc6f68 100644 --- a/server/modules/authenticator/MySQLAuth/dbusers.c +++ b/server/modules/authenticator/MySQLAuth/dbusers.c @@ -44,11 +44,11 @@ #define NEW_LOAD_DBUSERS_QUERY "SELECT u.user, u.host, d.db, u.select_priv, u.%s \ FROM mysql.user AS u LEFT JOIN mysql.db AS d \ - ON (u.user = d.user AND u.host = d.host) WHERE u.plugin = '' %s \ + ON (u.user = d.user AND u.host = d.host) WHERE u.plugin IN ('', 'mysql_native_password') %s \ UNION \ SELECT u.user, u.host, t.db, u.select_priv, u.%s \ FROM mysql.user AS u LEFT JOIN mysql.tables_priv AS t \ - ON (u.user = t.user AND u.host = t.host) WHERE u.plugin = '' %s" + ON (u.user = t.user AND u.host = t.host) WHERE u.plugin IN ('', 'mysql_native_password') %s" static int get_users(SERV_LISTENER *listener, bool skip_local); static MYSQL *gw_mysql_init(void); From 93f3529bb4d375fca35a43f03ce94b4d505bbdb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Sat, 3 Mar 2018 19:56:53 +0200 Subject: [PATCH 05/10] 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. --- server/modules/routing/avrorouter/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/modules/routing/avrorouter/CMakeLists.txt b/server/modules/routing/avrorouter/CMakeLists.txt index d23a4e986..0fe35de54 100644 --- a/server/modules/routing/avrorouter/CMakeLists.txt +++ b/server/modules/routing/avrorouter/CMakeLists.txt @@ -11,5 +11,6 @@ if(AVRO_FOUND AND JANSSON_FOUND) add_subdirectory(test) endif() else() - message(STATUS "No Avro C or Jansson libraries found, not building avrorouter.") + message(FATAL_ERROR "No Avro C or Jansson libraries found, cannot build avrorouter. " + "Use the -DBUILD_CDC=N option to `cmake` to disable building of the avrorouter.") endif() From 019312c4ee9cff76e3946f31f2a58b2d551589fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Tue, 30 Jan 2018 19:19:04 +0200 Subject: [PATCH 06/10] 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. --- server/modules/protocol/MySQL/MySQLClient/mysql_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/modules/protocol/MySQL/MySQLClient/mysql_client.c b/server/modules/protocol/MySQL/MySQLClient/mysql_client.c index 4c2b076e3..cce68dd21 100644 --- a/server/modules/protocol/MySQL/MySQLClient/mysql_client.c +++ b/server/modules/protocol/MySQL/MySQLClient/mysql_client.c @@ -1437,7 +1437,7 @@ static int gw_client_hangup_event(DCB *dcb) goto retblock; } - if (!session_valid_for_pool(session)) + if (session->state != SESSION_STATE_DUMMY && !session_valid_for_pool(session)) { // The client did not send a COM_QUIT packet modutil_send_mysql_err_packet(dcb, 0, 0, 1927, "08S01", "Connection killed by MaxScale"); From 65216f5e16259218d090d9754de7bbe9ca762c5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Mon, 5 Mar 2018 11:18:26 +0200 Subject: [PATCH 07/10] 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. --- maxscale-system-test/mariadb_nodes.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/maxscale-system-test/mariadb_nodes.cpp b/maxscale-system-test/mariadb_nodes.cpp index 1a51292a8..909454e0e 100644 --- a/maxscale-system-test/mariadb_nodes.cpp +++ b/maxscale-system-test/mariadb_nodes.cpp @@ -340,7 +340,10 @@ int Mariadb_nodes::change_master(int NewMaster, int OldMaster) execute_query(nodes[i], "stop slave;"); } } + execute_query(nodes[NewMaster], "STOP SLAVE"); + execute_query(nodes[NewMaster], "RESET SLAVE ALL"); execute_query(nodes[NewMaster], create_repl_user); + execute_query(nodes[OldMaster], "reset master;"); find_field(nodes[NewMaster], "show master status", "File", &log_file[0]); find_field(nodes[NewMaster], "show master status", "Position", &log_pos[0]); From cab827b0a48ef03b3c0d2f93fcbdbde59178b1ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Mon, 5 Mar 2018 11:30:18 +0200 Subject: [PATCH 08/10] 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. --- maxscale-system-test/failover_mysqlmon.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/maxscale-system-test/failover_mysqlmon.cpp b/maxscale-system-test/failover_mysqlmon.cpp index 52f2a9ed1..570609ada 100644 --- a/maxscale-system-test/failover_mysqlmon.cpp +++ b/maxscale-system-test/failover_mysqlmon.cpp @@ -62,6 +62,11 @@ int main(int argc, char *argv[]) "@@server_id is different: %s != %s", maxscale_id, real_id); test->close_maxscale_connections(); + test->ssh_maxscale(true, "maxadmin clear server server1 maintenance"); + test->ssh_maxscale(true, "maxadmin clear server server2 maintenance"); + test->ssh_maxscale(true, "maxadmin clear server server3 maintenance"); + test->repl->fix_replication(); + test->tprintf(" Check that MaxScale is running "); test->check_maxscale_alive(); From a0c890cdf6f37cdba2837c2e9a43dff780f9332e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Mon, 5 Mar 2018 11:47:51 +0200 Subject: [PATCH 09/10] Add maxadmin output to mxs1678_relay_master This should make test failure analysis easier. --- maxscale-system-test/mxs1678_relay_master.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/maxscale-system-test/mxs1678_relay_master.cpp b/maxscale-system-test/mxs1678_relay_master.cpp index bee2a0a97..bea153c75 100644 --- a/maxscale-system-test/mxs1678_relay_master.cpp +++ b/maxscale-system-test/mxs1678_relay_master.cpp @@ -67,6 +67,10 @@ int main(int argc, char** argv) StringSet relay_master = {"Relay Master", "Slave", "Running"}; test.tprintf("Checking before stopping IO thread"); + char *output = test.ssh_maxscale_output(true, "maxadmin list servers"); + test.tprintf("%s", output); + free(output); + test.add_result(state(test, "server1") != master, "server1 is not a master"); test.add_result(state(test, "server2") != slave, "server2 is not a slave"); test.add_result(state(test, "server3") != relay_master, "server3 is not a relay master"); @@ -76,6 +80,9 @@ int main(int argc, char** argv) sleep(10); test.tprintf("Checking after stopping IO thread"); + output = test.ssh_maxscale_output(true, "maxadmin list servers"); + test.tprintf("%s", output); + free(output); test.add_result(state(test, "server1") != master, "server1 is not a master"); test.add_result(state(test, "server2") != slave, "server2 is not a slave"); test.add_result(state(test, "server3") != relay_master, "server3 is not a relay master"); From 9144ed34482ada0ed0eb2ddb02f1106745dfc29a Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Tue, 6 Mar 2018 09:45:41 +0200 Subject: [PATCH 10/10] Update 2.1.14 Release Date --- Documentation/Release-Notes/MaxScale-2.1.13-Release-Notes.md | 2 +- Documentation/Release-Notes/MaxScale-2.1.14-Release-Notes.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/Release-Notes/MaxScale-2.1.13-Release-Notes.md b/Documentation/Release-Notes/MaxScale-2.1.13-Release-Notes.md index 24a144e33..249b956cf 100644 --- a/Documentation/Release-Notes/MaxScale-2.1.13-Release-Notes.md +++ b/Documentation/Release-Notes/MaxScale-2.1.13-Release-Notes.md @@ -1,4 +1,4 @@ -# MariaDB MaxScale 2.1.13 Release Notes -- 2017-01-05 +# MariaDB MaxScale 2.1.13 Release Notes -- 2018-01-05 Release 2.1.13 is a GA release. diff --git a/Documentation/Release-Notes/MaxScale-2.1.14-Release-Notes.md b/Documentation/Release-Notes/MaxScale-2.1.14-Release-Notes.md index 26eea2459..91a502fb8 100644 --- a/Documentation/Release-Notes/MaxScale-2.1.14-Release-Notes.md +++ b/Documentation/Release-Notes/MaxScale-2.1.14-Release-Notes.md @@ -1,4 +1,4 @@ -# MariaDB MaxScale 2.1.14 Release Notes +# MariaDB MaxScale 2.1.14 Release Notes -- 2018-03-06 Release 2.1.14 is a GA release.