[MXS-962] Add option to disallow server to ever be elected master Created: 2016-11-01  Updated: 2016-11-03  Resolved: 2016-11-03

Status: Closed
Project: MariaDB MaxScale
Component/s: galeramon
Affects Version/s: None
Fix Version/s: 2.1.0

Type: New Feature Priority: Minor
Reporter: Ben Stillman Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None


 Description   

Jira issues created by request per Markus.

The idea is to add a server option which disallows it to ever be elected master. For example, a five node cluster spread across two data centers. Nodes 1, 2, and 3 are in DC1, while nodes 4 and 5 are in DC2. The nodes in DC2 should never be elected master no matter what. An option is needed to add to the server configuration in maxscale.cnf. The possible option discussed was adding a priority of 0 since priority is already used by galeramon to elect the master. This way, a server configured with priority=0 would never be elected master.

Example:

## DC1 - Node 1
[dc1node1]
type=server
address=10.1.1.1
port=3306
protocol=MySQLBackend
priority=1
 
## DC1 - Node 2
[dc1node2]
type=server
address=10.1.1.2
port=3306
protocol=MySQLBackend
priority=1
 
## DC1 - Node 3
[dc1node3]
type=server
address=10.1.1.3
port=3306
protocol=MySQLBackend
priority=1
 
## DC2 - Node 1
[dc2node1]
type=server
address=10.2.1.1
port=3306
protocol=MySQLBackend
priority=0
 
## DC1 - Node 2
[dc2node2]
type=server
address=10.2.1.2
port=3306
protocol=MySQLBackend
priority=0

In the above example, dc2node1 and dc2node2 would never be elected master, even if dc1node1, dc1node2, and dc1node3 were shutdown gracefully.



 Comments   
Comment by markus makela [ 2016-11-01 ]

Added support to galeramon for nonpositive values in priority. A nonpositive value in priority will cause the server to never be chosen as the master.

Generated at Thu Feb 08 04:03:13 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.