I have a galera cluster with 4 nodes. 2 in one server (server-master) and 2 in another server (server-slave).
The clusters are controlled through "Max Scale".
All the setup seems correct as replication is working fine, SHOW STATUS LIKE 'wsrep_cluster_size'
reports correct size in all nodes, shutting the master is successfully transfered to the next node, etc.
maxscale server status reports: (summarized for simplicity)
Master, Synced, Running | Slave, Synced, Running | Slave, Synced, Running
If I execute stop both containers at the same time in "server-master", master DB is successfully assigned to the first container in "slave".
maxscale server status reports:
Down | Down | Master, Synced, Running | Slave, Synced, Running
The problem is: if I shutdown server-master,
maxscale server status reports:
Down, Down, Running, Running
And trying to connect to the cluster results in connection failed. After sometime, all nodes are reported Down
.
I don't understand why shutting down the server doesn't work as expected.
UPDATE
I discovered that if I turn off the second node in "server-master", and then I shutdown the server,"master" is successfully assigned to "server-slave", however after few minutes all nodes go down. :/
Servers: Ubuntu Servers 16.04 x64
MaxScale version: 2.0.5
LXD version: 2.13
Galera version (3): 25.3.20-xenial
Guide followed: https://www.digitalocean.com/community/tutorials/how-to-configure-a-galera-cluster-with-mariadb-10-1-on-ubuntu-16-04-servers
it's related to galera cluster behaviour.
So, you can not connect from client to maxscale ---> cluster.
ref : http://galeracluster.com/documentation-webpages/weightedquorum.html