Skip to content

Commit

Permalink
Merge pull request #556 from bwrobc/fix-health-check
Browse files Browse the repository at this point in the history
Fix sentinel health check
  • Loading branch information
ese authored Apr 20, 2023
2 parents c51fa70 + 19b16b2 commit b36fd58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion operator/redisfailover/service/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ func (r *RedisFailoverChecker) IsRedisRunning(rFailover *redisfailoverv1.RedisFa
// IsSentinelRunning returns true if all the pods are Running
func (r *RedisFailoverChecker) IsSentinelRunning(rFailover *redisfailoverv1.RedisFailover) bool {
dp, err := r.k8sService.GetDeploymentPods(rFailover.Namespace, GetSentinelName(rFailover))
return err == nil && len(dp.Items) > int(rFailover.Spec.Redis.Replicas-1) && AreAllRunning(dp)
return err == nil && len(dp.Items) > int(rFailover.Spec.Sentinel.Replicas-1) && AreAllRunning(dp)
}

// IsClusterRunning returns true if all the pods in the given redisfailover are Running
Expand Down
2 changes: 1 addition & 1 deletion operator/redisfailover/service/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ case $role in
check_slave
;;
*)
echo "unespected"
echo "unexpected"
exit 1
esac`, port)

Expand Down

0 comments on commit b36fd58

Please sign in to comment.