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:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user