Skip to content
This repository has been archived by the owner on Feb 18, 2025. It is now read-only.

Commit

Permalink
unrelated change: remove deprecated RemoteSSH* variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Shlomi Noach committed May 26, 2019
1 parent 3cfe0da commit 1c37be3
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions go/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,6 @@ type Configuration struct {
DelayMasterPromotionIfSQLThreadNotUpToDate bool // when true, and a master failover takes place, if candidate master has not consumed all relay logs, delay promotion until the sql thread has caught up
PostponeSlaveRecoveryOnLagMinutes uint // Synonym to PostponeReplicaRecoveryOnLagMinutes
PostponeReplicaRecoveryOnLagMinutes uint // 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
RemoteSSHForMasterFailover bool // Should orchestrator attempt a remote-ssh relaylog-synching upon master failover? Requires RemoteSSHCommand
RemoteSSHCommand string // A `ssh` command to be used by recovery process to read/apply relaylogs. If provided, this variable must contain the text "{hostname}". The remote SSH login must have the privileges to read/write relay logs. Example: "setuidgid remoteuser ssh {hostname}"
RemoteSSHCommandUseSudo bool // Should orchestrator apply 'sudo' on the remote host upon SSH command
OSCIgnoreHostnameFilters []string // OSC replicas recommendation will ignore replica hostnames matching given patterns
GraphiteAddr string // Optional; address of graphite port. If supplied, metrics will be written here
GraphitePath string // Prefix for graphite path. May include {hostname} magic placeholder
Expand Down Expand Up @@ -412,9 +409,6 @@ func newConfiguration() *Configuration {
FailMasterPromotionIfSQLThreadNotUpToDate: false,
DelayMasterPromotionIfSQLThreadNotUpToDate: false,
PostponeSlaveRecoveryOnLagMinutes: 0,
RemoteSSHForMasterFailover: false,
RemoteSSHCommand: "",
RemoteSSHCommandUseSudo: true,
OSCIgnoreHostnameFilters: []string{},
GraphiteAddr: "",
GraphitePath: "",
Expand Down Expand Up @@ -531,21 +525,12 @@ func (this *Configuration) postReadAdjustments() error {
this.URLPrefix = "/" + this.URLPrefix
}

if this.RemoteSSHCommand != "" {
if !strings.Contains(this.RemoteSSHCommand, "{hostname}") {
return fmt.Errorf("config's RemoteSSHCommand must either be empty, or contain a '{hostname}' placeholder")
}
}

if this.IsSQLite() && this.SQLite3DataFile == "" {
return fmt.Errorf("SQLite3DataFile must be set when BackendDB is sqlite3")
}
if this.IsSQLite() {
// this.HostnameResolveMethod = "none"
}
if this.RemoteSSHForMasterFailover && this.RemoteSSHCommand == "" {
return fmt.Errorf("RemoteSSHCommand is required when RemoteSSHForMasterFailover is set")
}
if this.RaftEnabled && this.RaftDataDir == "" {
return fmt.Errorf("RaftDataDir must be defined since raft is enabled (RaftEnabled)")
}
Expand Down

0 comments on commit 1c37be3

Please sign in to comment.