Skip to content

Conversation

@rurkss
Copy link

@rurkss rurkss commented Jul 15, 2025

Starting with version 2.4.0 of the redis-operator, we are removing HAProxy from the cluster in bootstrap mode.

However, the cluster health check still expects HAProxy to be present.

if rFailover.Bootstrapping() && !rFailover.SentinelsAllowed() {
    return r.IsRedisRunning(rFailover) && r.IsHAProxyRunning(rFailover)
}

As a result, the health check fails, preventing the Redis custom resource from updating its status and causing the deployment to fail.

Logic now distinguishes between:

  • Bootstrap mode with sentinels disabled → only Redis must be running.

  • Bootstrap mode with sentinels allowed → Redis and Sentinel must be running.

  • Normal mode → Redis, Sentinel, and HAProxy must all be running.

@rurkss rurkss self-assigned this Jul 15, 2025
@rurkss rurkss requested a review from a team as a code owner July 15, 2025 18:17
@rurkss rurkss changed the title [GOG-1162] Fix Cluster HealthCheck to Exclude HAProxy Check During Bootstrap [GOG-1162] Fix Cluster Health Check to Skip HAProxy Validation in Bootstrap Mode Jul 15, 2025
mfilipe
mfilipe previously approved these changes Jul 15, 2025
Copy link

@mfilipe mfilipe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code in operator/redisfailover/service/check.go is straightforward. About the tests, I don't know exactly why you are checking the deployment pods, but it seems good.

c-gerke
c-gerke previously approved these changes Jul 15, 2025
Copy link
Member

@c-gerke c-gerke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@rurkss rurkss dismissed stale reviews from c-gerke and mfilipe via 7c900a0 July 16, 2025 14:52
@rurkss rurkss requested a review from indiebrain July 16, 2025 14:54
@rurkss rurkss merged commit 5833151 into master Jul 16, 2025
12 checks passed
@rurkss rurkss deleted the GOG-1162 branch July 16, 2025 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants