Add config parameter for excluding servers from failover

"servers_no_promotion" is a comma-separated list of servers
which cannot be chosen when selecting a new master during failover
(auto or manual), or when automatically selecting a new master
for switchover (currently disabled).

The servers in the list are redirected normally and can be promoted
by switchover when manually selecting a new master.
This commit is contained in:
Esa Korhonen
2018-01-30 15:18:01 +02:00
parent 6f6c11e6a3
commit 1cf3de4a74
5 changed files with 200 additions and 56 deletions

View File

@ -73,6 +73,9 @@ typedef struct
int64_t master_gtid_domain; /**< Gtid domain currently used by the master */
bool auto_rejoin; /**< Attempt to start slave replication on standalone servers or servers
replicating from the wrong master. */
int n_excluded; /**< Number of excluded servers */
MXS_MONITORED_SERVER** excluded_servers; /**< Servers banned for master promotion during auto-failover. */
MXS_MONITOR* monitor;
} MYSQL_MONITOR;