Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

More terminology changes #1187

Merged
merged 1 commit into from
Jun 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/configuration-recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ Different environments require different actions taken on recovery/promotion
- `DelayMasterPromotionIfSQLThreadNotUpToDate`: if all replicas were lagging at time of failure, even the most up-to-date, promoted replica may yet have unapplied relay logs. When `true`, 'orchestrator' will wait for the SQL thread to catch up before promoting a new master.
`FailMasterPromotionIfSQLThreadNotUpToDate` and `DelayMasterPromotionIfSQLThreadNotUpToDate` are mutually exclusive.
- `DetachLostReplicasAfterMasterFailover`: some replicas may get lost during recovery. When `true`, `orchestrator` will forcibly break their replication via `detach-replica` command to make sure no one assumes they're at all functional.
- `MasterFailoverDetachReplicaMasterHost` : when `true`, `orchestrator` will issue a detach-slave-master-host on promoted master (this makes sure the new master will not attempt to replicate old master if that comes back to life). Default: `false`. Meaningless if `ApplyMySQLPromotionAfterMasterFailover` is `true`. `MasterFailoverDetachSlaveMasterHost` is an alias to this.
- `MasterFailoverLostInstancesDowntimeMinutes`: number of minutes to downtime any server that was lost after a master failover (including failed master & lost slaves). Set to 0 to disable. Default: 0.
- `MasterFailoverDetachReplicaMasterHost` : when `true`, `orchestrator` will issue a `detach-replica-master-host` on promoted master (this makes sure the new master will not attempt to replicate old master if that comes back to life). Default: `false`. Meaningless if `ApplyMySQLPromotionAfterMasterFailover` is `true`. `MasterFailoverDetachSlaveMasterHost` is an alias to this.
- `MasterFailoverLostInstancesDowntimeMinutes`: number of minutes to downtime any server that was lost after a master failover (including failed master & lost replicas). Set to 0 to disable. Default: 0.
- `PostponeReplicaRecoveryOnLagMinutes`: on crash recovery, replicas that are lagging more than given minutes are only resurrected late in the recovery process, after master/IM has been elected and processes executed. Value of 0 disables this feature. Default: 0. `PostponeSlaveRecoveryOnLagMinutes` is an alias to this.

### Hooks
Expand Down Expand Up @@ -150,14 +150,14 @@ And, in the event a recovery was successful:
- `{failureCluster}`
- `{failureClusterAlias}`
- `{failureClusterDomain}`
- `{countReplicas}` aka `{countSlaves}`
- `{countReplicas}` (replaces `{countSlaves}`)
- `{isDowntimed}`
- `{autoMasterRecovery}`
- `{autoIntermediateMasterRecovery}`
- `{orchestratorHost}`
- `{lostReplicas}` aka `{lostSlaves}`
- `{lostReplicas}` (replaces `{lostSlaves}`)
- `{countLostReplicas}`
- `{replicaHosts}` aka `{slaveHosts}`
- `{replicaHosts}` (replaces `{slaveHosts}`)
- `{isSuccessful}`
- `{command}` (`"force-master-failover"`, `"force-master-takeover"`, `"graceful-master-takeover"` if applicable)

Expand Down
8 changes: 4 additions & 4 deletions docs/configuration-sample.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,19 +121,19 @@ The following is a production configuration file, with some details redacted.
"*"
],
"OnFailureDetectionProcesses": [
"/redacted/our-orchestrator-recovery-handler -t 'detection' -f '{failureType}' -h '{failedHost}' -C '{failureCluster}' -A '{failureClusterAlias}' -n '{countSlaves}'"
"/redacted/our-orchestrator-recovery-handler -t 'detection' -f '{failureType}' -h '{failedHost}' -C '{failureCluster}' -A '{failureClusterAlias}' -n '{countReplicas}'"
],
"PreGracefulTakeoverProcesses": [
"echo 'Planned takeover about to take place on {failureCluster}. Master will switch to read_only' >> /tmp/recovery.log"
],
"PreFailoverProcesses": [
"/redacted/our-orchestrator-recovery-handler -t 'pre-failover' -f '{failureType}' -h '{failedHost}' -C '{failureCluster}' -A '{failureClusterAlias}' -n '{countSlaves}'"
"/redacted/our-orchestrator-recovery-handler -t 'pre-failover' -f '{failureType}' -h '{failedHost}' -C '{failureCluster}' -A '{failureClusterAlias}' -n '{countReplicas}'"
],
"PostFailoverProcesses": [
"/redacted/our-orchestrator-recovery-handler -t 'post-failover' -f '{failureType}' -h '{failedHost}' -H '{successorHost}' -C '{failureCluster}' -A '{failureClusterAlias}' -n '{countSlaves}' -u '{recoveryUID}'"
"/redacted/our-orchestrator-recovery-handler -t 'post-failover' -f '{failureType}' -h '{failedHost}' -H '{successorHost}' -C '{failureCluster}' -A '{failureClusterAlias}' -n '{countReplicas}' -u '{recoveryUID}'"
],
"PostUnsuccessfulFailoverProcesses": [
"/redacted/our-orchestrator-recovery-handler -t 'post-unsuccessful-failover' -f '{failureType}' -h '{failedHost}' -C '{failureCluster}' -A '{failureClusterAlias}' -n '{countSlaves}' -u '{recoveryUID}'"
"/redacted/our-orchestrator-recovery-handler -t 'post-unsuccessful-failover' -f '{failureType}' -h '{failedHost}' -C '{failureCluster}' -A '{failureClusterAlias}' -n '{countReplicas}' -u '{recoveryUID}'"
],
"PostMasterFailoverProcesses": [
"/redacted/do-something # e.g. kick pt-heartbeat on promoted master"
Expand Down
2 changes: 1 addition & 1 deletion docs/script-samples.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ start slave io_thread;
Compare with:

```shell
$ orchestrator-client -c stop-slave -i mysql-bb00.dc1.domain.net
$ orchestrator-client -c stop-replica -i mysql-bb00.dc1.domain.net
mysql-bb00.dc1.domain.net:3306

$ orchestrator-client -c restart-replica-statements -i mysql-bb00.dc1.domain.net -query "change master to auto_position=1" | jq .[] -r
Expand Down
5 changes: 5 additions & 0 deletions go/app/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ func (a stringSlice) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
func (a stringSlice) Less(i, j int) bool { return a[i] < a[j] }

var commandSynonyms = map[string]string{
"stop-slave": "stop-replica",
"start-slave": "start-replica",
"restart-slave": "restart-replica",
"reset-slave": "reset-replica",
"restart-slave-statements": "restart-replica-statements",
"relocate-slaves": "relocate-replicas",
"regroup-slaves": "regroup-replicas",
"move-up-slaves": "move-up-replicas",
Expand Down