[MXS-656] after upgrade from 1.3 to 1.4, selecting master isn't working as expected Created: 2016-04-01 Updated: 2016-04-15 Resolved: 2016-04-04 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | galeramon |
| Affects Version/s: | 1.4.0, 1.4.1 |
| Fix Version/s: | 1.4.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Wesley Schaft | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
CentOS release 6.7 (Final) |
||
| Description |
|
We have 12 MaxScale (version 1.3.0) servers running at the moment, behind HAproxy and connected to a Galera Cluster of 4 nodes (1 master, 3 slaves) I've put 1 server in maintenance, so I could try to update MaxScale to 1.4.1. Situation before updating (and running 1.3.0):
After updating (running 1.4.1)
Whatever we do, we can't get db-03 to be Master again. It will always change back to db-06. We've noticed some difference in the "Node Id" from "show servers" output. On 1.3.0, the Node Id = 0 and on 1.4.1 the Node Id = -1 On 1.3.0:
On 1.4.1:
The logfile shows some errors:
When we downgrade back to 1.3.0, server db-03 is Master again. |
| Comments |
| Comment by markus makela [ 2016-04-02 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
You can control which server is the master by using the priority functionality in the Galera monitor: https://mariadb.com/kb/en/mariadb-enterprise/mariadb-maxscale/maxscale-galera-monitor/ The fact that the node ID is different does seem to be a bug of some sort. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Wesley Schaft [ 2016-04-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thank you Markus, with the priority option, server db-03 is seen as Master in Maxscale 1.4. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by markus makela [ 2016-04-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The node with the lowest index should still be seen as the master. This behavior is not expected and we'll investigate why it happens. If any information about the cluster or how MaxScale is configured is available, please provide it. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by markus makela [ 2016-04-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
A look at the diff between 1.3.0 and 1.4.1 doesn't point any reasons that could cause the indexes to be interpreted differently. Looking at the 1.3.0 code does point out one oddity:
The value of local_index is ignored if errno is not 0. The correct check would be to check for the last parsed character. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Wesley Schaft [ 2016-04-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This is our current, working Maxscale 1.4.1 config (with the passwords removed):
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by markus makela [ 2016-04-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Fixed in commit 358c1946a75c7e3a9d7e4740d98ec43f4000ce44 |