Skip to content

Commit 932673c

Browse files
committed
Regression with Failover scripts after split code to function 435
1 parent c6c687c commit 932673c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cluster/cluster_fail.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ func (cluster *Cluster) failoverPostScript() {
540540
var out []byte
541541
var err error
542542
cluster.LogPrintf(LvlInfo, "Calling post-failover script")
543-
out, err = exec.Command(cluster.Conf.PostScript, cluster.oldMaster.Host, cluster.master.Host, cluster.oldMaster.Port, cluster.master.Port, cluster.oldMaster.MxsServerName, cluster.master.MxsServerName).CombinedOutput()
543+
out, err = exec.Command(cluster.Conf.PostScript, cluster.oldMaster.Host, cluster.GetMaster().Host, cluster.oldMaster.Port, cluster.GetMaster().Port, cluster.oldMaster.MxsServerName, cluster.GetMaster().MxsServerName).CombinedOutput()
544544
if err != nil {
545545
cluster.LogPrintf(LvlErr, "%s", err)
546546
}
@@ -554,7 +554,7 @@ func (cluster *Cluster) failoverPreScript() {
554554
cluster.LogPrintf(LvlInfo, "Calling pre-failover script")
555555
var out []byte
556556
var err error
557-
out, err = exec.Command(cluster.Conf.PreScript, cluster.oldMaster.Host, cluster.vmaster.Host, cluster.oldMaster.Port, cluster.vmaster.Port, cluster.oldMaster.MxsServerName, cluster.vmaster.MxsServerName).CombinedOutput()
557+
out, err = exec.Command(cluster.Conf.PreScript, cluster.oldMaster.Host, cluster.GetMaster().Host, cluster.oldMaster.Port, cluster.GetMaster().Port, cluster.oldMaster.MxsServerName, cluster.GetMaster().MxsServerName).CombinedOutput()
558558
if err != nil {
559559
cluster.LogPrintf(LvlErr, "%s", err)
560560
}

0 commit comments

Comments
 (0)