fix: skip unprobeable pods so failover convergence doesn’t back off f…#1712
Open
sinner- wants to merge 2 commits intoOT-CONTAINER-KIT:mainfrom
Open
fix: skip unprobeable pods so failover convergence doesn’t back off f…#1712sinner- wants to merge 2 commits intoOT-CONTAINER-KIT:mainfrom
sinner- wants to merge 2 commits intoOT-CONTAINER-KIT:mainfrom
Conversation
c95d16c to
d1365ef
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1712 +/- ##
=======================================
Coverage ? 32.11%
=======================================
Files ? 83
Lines ? 6803
Branches ? 0
=======================================
Hits ? 2185
Misses ? 4402
Partials ? 216 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Author
|
hey @shubham-cmyk @drivebyer @iamabhishek-dubey any guidance on how I can best contribute to moving this forward? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Summary
Fix RedisReplication failover convergence when one Redis pod is unreachable during Sentinel-led master promotion.
Previously,
GetRedisNodesByRole()would fail the reconcile as soon as it hit an unreachable Redis pod. In the reported scenario, that meant the operator could not updateredis-rolelabels orRedisReplication.status.masterNodeafter Sentinel had already promoted a new master. As a result, the<name>-masterService kept pointing at the wrong pod and clients remained stuck until controller-runtime eventually retried after exponential backoff.This change updates the controller to reason over the probable Redis topology instead of aborting on a single unavailable ordinal.
What changed
PendingpodsReadypodsPodIPWhy this fixes the issue
With this change, a failed or pending old master no longer causes reconcile to return an error just because that ordinal cannot be probed. The operator can continue to observe the surviving ready Redis pods, identify the Sentinel-elected master, update
status.masterNode, and refreshredis-rolelabels. That allows the<name>-masterService to move to the new master quickly instead of waiting for error-driven exponential backoff to unwind.In short:
Validation
Executed:
env GOCACHE=/tmp/redis-operator-go-build-cache go test ./internal/k8sutilsenv GOCACHE=/tmp/redis-operator-go-build-cache go test ./internal/controller/common/redisenv GOCACHE=/tmp/redis-operator-go-build-cache go test ./internal/controller/redisreplication -run 'TestReconcileRedis|TestReconcileStatus'Fixes #1711
Type of change
Checklist