include-slaves - do not move slaves into write hostgroup even if the whole cluster went down.

Description

--include-slaves=host_name:port Add specified slave node(s) to ProxySQL, these nodes will go into the reader hostgroup and will only be put into the writer hostgroup if all cluster nodes are down. Slaves must be read only. Can accept a comma delimited list. If this is used make sure 'read_only=1' is in the slave's

Even if the whole cluster went down do not move the async slaves into write hostgroup because that can be dangerous. 

Environment

None

Smart Checklist

Activity

Show:

KennT September 22, 2018 at 10:08 AM

commit ecf00bbd56fd616bdc9191e5dc382bee13edf215
Author: Kenn Takara <kenn.takara@percona.com>
Date: Sat Sep 22 00:04:29 2018 -0700

https://perconadev.atlassian.net/browse/PSQLADM-107#icft=PSQLADM-107 : include-slaves - do not move slaves into write hostgroup even if the whole cluster went down.

Issue
The default behavior (if async slaves are used), is to add an async
slave to the WRITE hostgroup if all PXC nodes are down.

Solution
Make this into an option (--use-slave-as-writer=<yes/no>). This option
is now required to be specified if async-slaves are specified when using
proxysql-admin.

KennT September 13, 2018 at 10:20 AM
Edited

Totally agree, but we can't change existing behavior (if someone is depending on this). We will have to add an option for this.  Maybe "-use-slaves-as-writers=<yes or no>" and add this as a required option if "-include-slaves" is used.

Done

Details

Assignee

Reporter

Time tracking

2d logged

Fix versions

Affects versions

Priority

Smart Checklist

Created September 13, 2018 at 9:37 AM
Updated March 6, 2024 at 5:46 PM
Resolved September 22, 2018 at 10:08 AM