Skip to content

Commit

Permalink
repair slave of master when master referent conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
polefishu committed Jan 19, 2020
1 parent 58901e9 commit d8b3fe7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/controller/clustering/placement_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit d8b3fe7

Please sign in to comment.