feat: add max remediation attempts per equivalence group - #1639
Closed
iacker wants to merge 3 commits into
Closed
Conversation
Signed-off-by: Billard <82095453+iacker@users.noreply.github.com>
Signed-off-by: Billard <82095453+iacker@users.noreply.github.com>
This addresses issue NVIDIA#1543 by implementing a configurable limit on the number of remediation attempts per equivalence group. Changes: - Add MaxRetryAttempts config field to TomlConfig - Add RetryCount field to EquivalenceGroupState (persists in node annotation) - Increment retry count on each remediation attempt - Skip remediation when retry limit is exceeded - Add tests for retry count tracking and persistence The retry counter survives pod restarts because it's stored in the node's annotation rather than in-memory state. Fixes NVIDIA#1543 Signed-off-by: Billard <82095453+iacker@users.noreply.github.com>
Contributor
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughThe change persists remediation retry counts per equivalence group, enforces configurable retry limits, and normalizes GPU recovery entities to clear stale conditions after hardware replacement. ChangesRemediation retry limits
GPU recovery identity handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Reconciler
participant NodeAnnotationManager
participant NodeAnnotations
participant RemediationStatus
Reconciler->>NodeAnnotationManager: check equivalence group retryCount
NodeAnnotationManager->>NodeAnnotations: read persisted group state
NodeAnnotationManager-->>Reconciler: return retryCount
Reconciler->>RemediationStatus: mark failed and skipped at limit
Suggested reviewers: ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Contributor
Author
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.
This PR implements a configurable maximum number of remediation attempts per equivalence group to prevent infinite remediation loops.
Changes
MaxRetryAttemptsfield toTomlConfig(default 0 = unlimited, preserving current behavior)RetryCountfield toEquivalenceGroupStatein the node annotationImplementation
The retry counter persists across pod restarts because it's stored in the node's annotation (
nvidia.com/fault-remediation-state) rather than in-memory state. Each time a remediation CR is created for an equivalence group, the counter increments and is written back to the annotation.When
MaxRetryAttemptsis configured and the limit is reached, the remediation is skipped with the same behavior as unsupported events (marked as failed, event processed, but no CR created).Testing
All tests pass.
Fixes #1543
Summary by CodeRabbit