From fcabda15a85c4a0d3f5b2390d77bc164edf5a3c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Fri, 28 Jul 2017 11:52:49 +0300 Subject: [PATCH] MXS-1335: Disable root_node_as_master by default Enabling the option hinders the use of maintenance mode with the root master node in most use-cases. This behavior occurs due to the fact that the maintenance mode causes a server to be treted as if it was down. The Galera monitor waits for the cluster to reorganize before assigning a new master node. This is correct (but very unexpected) behavior for single instance use-cases. --- Documentation/Monitors/Galera-Monitor.md | 5 +++-- .../Release-Notes/MaxScale-2.1.5-Release-Notes.md | 7 +++++++ server/modules/monitor/galeramon/galeramon.c | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Documentation/Monitors/Galera-Monitor.md b/Documentation/Monitors/Galera-Monitor.md index 4014d610d..0104d3d48 100644 --- a/Documentation/Monitors/Galera-Monitor.md +++ b/Documentation/Monitors/Galera-Monitor.md @@ -65,8 +65,9 @@ use_priority=true ### `root_node_as_master` This option controls whether the write master Galera node requires a -_wsrep_local_index_ value of 0. This option is enabled by default and was -introduced in MaxScale 2.1.0. +_wsrep_local_index_ value of 0. This option was introduced in MaxScale 2.1.0 and +it is disabled by default in versions 2.1.5 and newer. In versions 2.1.4 and +older, the option was enabled by default. A Galera cluster will always have a node which has a _wsrep_local_index_ value of 0. Based on this information, multiple MaxScale instances can always pick the diff --git a/Documentation/Release-Notes/MaxScale-2.1.5-Release-Notes.md b/Documentation/Release-Notes/MaxScale-2.1.5-Release-Notes.md index aeaa7bb5a..ab0fb6191 100644 --- a/Documentation/Release-Notes/MaxScale-2.1.5-Release-Notes.md +++ b/Documentation/Release-Notes/MaxScale-2.1.5-Release-Notes.md @@ -26,6 +26,12 @@ and the rest of the certificates on the file are stored in the chain store. This change should not cause any changes in MaxScale's behavior. +### `root_node_as_master` + +The galeramon parameter `root_node_as_master` is now disabled by default. The +option should be enabled when it is of great importance to know that all +MaxScale instances treat a shared Galera cluster in the same way. + ### Schemarouter Starting with MaxScale 2.1.5, the _schemarouter_ will prioritize the current @@ -57,6 +63,7 @@ will still go to the central database. [Here is a list of bugs fixed in MaxScale 2.1.5.] (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.5) +* [MXS-1335](https://jira.mariadb.org/browse/MXS-1335) root_node_as_master should not be enabled by default * [MXS-1330](https://jira.mariadb.org/browse/MXS-1330) insertstream attempts to parse all buffers * [MXS-1329](https://jira.mariadb.org/browse/MXS-1329) Using filters with SSL and keep alive can cause errors * [MXS-1328](https://jira.mariadb.org/browse/MXS-1328) Strange behavior with routes between master / slaves diff --git a/server/modules/monitor/galeramon/galeramon.c b/server/modules/monitor/galeramon/galeramon.c index b249b3949..f748e2fd8 100644 --- a/server/modules/monitor/galeramon/galeramon.c +++ b/server/modules/monitor/galeramon/galeramon.c @@ -93,7 +93,7 @@ MXS_MODULE* MXS_CREATE_MODULE() {"disable_master_failback", MXS_MODULE_PARAM_BOOL, "false"}, {"available_when_donor", MXS_MODULE_PARAM_BOOL, "false"}, {"disable_master_role_setting", MXS_MODULE_PARAM_BOOL, "false"}, - {"root_node_as_master", MXS_MODULE_PARAM_BOOL, "true"}, + {"root_node_as_master", MXS_MODULE_PARAM_BOOL, "false"}, {"use_priority", MXS_MODULE_PARAM_BOOL, "false"}, { "script",