Fixed galeramon not setting server status for downed servers

If galeramon isn't able to connect to a Galera node, the server state is left
unaltered. This will cause servers that lose connectivity to be in RUNNING|JOINED
state which causes them to be assigned with the SLAVE status. For servers that are
never accessible, the state will be RUNNING.
This commit is contained in:
Markus Makela
2015-11-27 17:09:43 +02:00
parent 7f97a91e02
commit 609ed62a69

View File

@ -316,6 +316,11 @@ monitorDatabase(MONITOR *mon, MONITOR_SERVERS *database)
mon_log_connect_error(database, rval);
}
server_clear_status(&temp_server, SERVER_MASTER);
server_clear_status(&temp_server, SERVER_MASTER_STICKINESS);
server_clear_status(&temp_server, SERVER_SLAVE);
server_transfer_status(database->server, &temp_server);
return;
}