Skip to content

Commit 52c67ff

Browse files
authored
[Fix] : wait follower statefulset ready before make cluster (#680)
Signed-off-by: drivebyer <wuyangmuc@gmail.com>
1 parent 10fd741 commit 52c67ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controllers/rediscluster_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ func (r *RedisClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request
159159
return ctrl.Result{RequeueAfter: time.Second * 120}, nil
160160
}
161161

162-
if int32(redisLeaderInfo.Status.ReadyReplicas) != leaderReplicas && int32(redisFollowerInfo.Status.ReadyReplicas) != followerReplicas {
162+
if !(redisLeaderInfo.Status.ReadyReplicas == leaderReplicas && redisFollowerInfo.Status.ReadyReplicas == followerReplicas) {
163163
reqLogger.Info("Redis leader and follower nodes are not ready yet", "Ready.Replicas", strconv.Itoa(int(redisLeaderInfo.Status.ReadyReplicas)), "Expected.Replicas", leaderReplicas)
164164
return ctrl.Result{RequeueAfter: time.Second * 120}, nil
165165
}

0 commit comments

Comments
 (0)