From d8b3fe7ccaef27de9cb2d3f731726dc2b1b77674 Mon Sep 17 00:00:00 2001 From: fishu Date: Sun, 19 Jan 2020 17:48:20 +0800 Subject: [PATCH] repair slave of master when master referent conflict --- pkg/controller/clustering/placement_v2.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/controller/clustering/placement_v2.go b/pkg/controller/clustering/placement_v2.go index 652994054..55332288e 100644 --- a/pkg/controller/clustering/placement_v2.go +++ b/pkg/controller/clustering/placement_v2.go @@ -118,7 +118,9 @@ func (c *Ctx) PlaceSlaves() error { } if node.GetRole() == redisv1alpha1.RedisClusterNodeRoleSlave { if node.MasterReferent != master.ID { - return fmt.Errorf("master referent conflict, %s:%s vs %s:%s", node.MasterReferent, node.IP, master.ID, master.IP) + c.log.Error(nil, "master referent conflict", "node ip", node.IP, + "current masterID", node.MasterReferent, "expect masterID", master.ID, "master IP", master.IP) + c.slavesByMaster[master.ID] = append(c.slavesByMaster[master.ID], node) } continue }