MXS-1859 Add options for enforcing read_only on slaves

If the feature is enabled (default off), at the end of a monitor loop
(once server states are known), read_only is enabled on slaves servers
without it.
This commit is contained in:
Esa Korhonen
2018-05-16 18:02:19 +03:00
parent 7c0ea3220c
commit fb56de641a
3 changed files with 51 additions and 3 deletions

View File

@ -75,6 +75,7 @@ typedef struct
int external_master_port; /**< External master port */
bool auto_rejoin; /**< Attempt to start slave replication on standalone servers or servers
replicating from the wrong master. */
bool enforce_read_only_slaves; /**< Should the monitor set read-only=1 on any slave servers. */
int n_excluded; /**< Number of excluded servers */
MXS_MONITORED_SERVER** excluded_servers; /**< Servers banned for master promotion during auto-failover. */
const char* promote_sql_file; /**< File with sql commands which are ran to a server being promoted. */