[MXS-109] Galera monitor: Minimum cluster size and/or refuse two cluster IDS in 1 cluster Created: 2015-04-22  Updated: 2017-02-08  Resolved: 2017-02-08

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

Type: New Feature Priority: Major
Reporter: Michaël de groot Assignee: Massimiliano Pinto (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Sprint: 2017-26, 2017-27

 Description   

I think 2 extra features in the Galera monitor module would be a good addition to MaxScale.

If we have a 3 node galera cluster and somebody accidently bootstrap each one (or 2) of them, MaxScale would currently send traffic to all nodes allthough they are not in a cluster together.

I think there are 2 ways to avoid this in the MaxScale monitor, option 1 is easy and option 2 is elegant.
1: Config parameter with the minimum cluster size. If any node is up but the minimum cluster size is too low, consider the node down.

2a: If there are several cluster identifiers present in the list of servers MaxScale knows about, only consider the servers with cluster identifier that occurs at least 1 time more then the other identifier(s)
2b: If there are several cluster identifiers present in the servers MaxScale knows about do not consider any of the nodes up



 Comments   
Comment by Guillaume Lefranc [ 2015-04-23 ]

Hi Michael,

interesting points, I like the solution 2. which has two advantages, being configuration-less and elegant.
I'll check if I can implement it in the development branch.

Cheers
Guillaume

Comment by Massimiliano Pinto (Inactive) [ 2017-02-02 ]

tanj michaeldg

Current work is in https://github.com/mariadb-corporation/MaxScale/tree/MXS-109

Monitored nodes could be part of different cluster UUIDs: select only
the ones belonging to UUID with more joined nodes.

In case of different UUIDs, if the joined nodes number is less than (n_nodes
/ 2 ) + 1 don’t consider any node part of the cluster

MaxAdmin> show monitors

....
Galera Cluster UUID: c08b6deb-e933-11e6-bf35-bb1d2a329b2e
Galera Cluster size: 4

maxscale.log

2017-02-02 11:00:07 info : [galeramon] Galera cluster UUID is now c08b6deb-e933-11e6-bf35-bb1d2a329b2e with 4 members of 4 nodes

2 differents UUIDs

2017-02-02 12:30:40 debug : [galeramon] Candidate cluster member server1: UUID c08b6deb-e933-11e6-bf35-bb1d2a329b2e, joined nodes 2
2017-02-02 12:30:40 debug : [galeramon] Candidate cluster member server2: UUID fa7b0cab-e942-11e6-a67e-b669708bfe5a, joined nodes 2
2017-02-02 12:30:40 debug : [galeramon] Candidate cluster member server3: UUID c08b6deb-e933-11e6-bf35-bb1d2a329b2e, joined nodes 2
2017-02-02 12:30:40 debug : [galeramon] Candidate cluster member server4: UUID fa7b0cab-e942-11e6-a67e-b669708bfe5a, joined nodes 2
2017-02-02 12:30:40 error : [galeramon] Galera cluster cannot be set with 2 members of 4: not enough nodes (3 at least)

MaxAdmin> show monitors
.....

Galera Cluster NOT set: no member nodes

Comment by Massimiliano Pinto (Inactive) [ 2017-02-02 ]

tanj michaeldg

In case of 2 UUIDs if the user stops all the nodes of UUID_A (the good cluster), then nodes od UUID_B (the wrong one) will become part of the one Cluster MaxScale sees

Comment by Michaël de groot [ 2017-02-08 ]

I think that is correct behaviour. Excellent work!

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