reconcile all nvidiadrivers when any nvidiadriver is changed#2258
Open
rahulait wants to merge 1 commit intoNVIDIA:mainfrom
Open
reconcile all nvidiadrivers when any nvidiadriver is changed#2258rahulait wants to merge 1 commit intoNVIDIA:mainfrom
rahulait wants to merge 1 commit intoNVIDIA:mainfrom
Conversation
bf127d3 to
44050bf
Compare
Signed-off-by: Rahul Sharma <rahulsharm@nvidia.com>
44050bf to
6497fe8
Compare
Contributor
Author
|
/ok to test 6497fe8 |
Member
|
This mostly looks good to me, Rahul. Have you tested the case where instead of deleting the default CR, you edit it to narrow the scope to limit overlap with a new, custom CR? |
Contributor
Author
Yup, I tested this scenario as well and it works fine. Tested by having 3 node cluster with default nvd, then adding two more nvds targetting individual nodes and then limiting scope of default to one node. All nvds were able to bring up drivers correctly on each node. |
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
Fixes: #2259
Issue
When multiple NVIDIADriver CRs exist, conflict validation is global (overlapping node selection across all driver CRs). A common case is the default CR (no nodeSelector) selecting all GPU nodes, which blocks custom CRs with targeted selectors.
Blocked CRs currently exit reconcile from the validation path with no requeue, so they remain stuck until an external event re-triggers them.
Deleting the conflicting default CR changes global validity, but previously only the deleted object was enqueued by the primary watch, so remaining CRs were not retried immediately.
Options Considered
Option 1 (implemented):
On NVIDIADriver events, enqueue reconcile for all NVIDIADriver CRs via TypedEnqueueRequestsFromMapFunc (fan-out).
Option 2 (not implemented):
Return error from validation failure so each conflicting CR self-requeues via the rate-limiter.
Basically here. switch from nil to error:
gpu-operator/controllers/nvidiadriver_controller.go
Line 151 in d5750f2
Why Option 1
Why Option 2 is less useful
Expected Outcome
After removing a conflicting NVIDIADriver (for example, deleting default CR), remaining previously blocked CRs are automatically revalidated and can proceed without manual nudges.
Checklist
make lint)make validate-generated-assets)make validate-modules)Testing