OCPBUGS-99751: Verify MOSC existence via API before serving layered image - #6352
OCPBUGS-99751: Verify MOSC existence via API before serving layered image#6352umohnani8 wants to merge 1 commit into
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@umohnani8: This pull request references Jira Issue OCPBUGS-99751, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/pipeline required |
|
Scheduling tests matching the |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe cluster server now verifies cached ChangesLayered-image consistency
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant ConfigRequest
participant clusterServer
participant MOSCLister
participant MachineConfigurationAPI
ConfigRequest->>clusterServer: GetConfig
clusterServer->>MOSCLister: Read cached MachineOSConfig
clusterServer->>MachineConfigurationAPI: Verify MachineOSConfig
MachineConfigurationAPI-->>clusterServer: Object or NotFound
clusterServer-->>ConfigRequest: Layered image or base image
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error)
✅ Passed checks (14 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@umohnani8: This pull request references Jira Issue OCPBUGS-99751, which is valid. 3 validation(s) were run on this bug
DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: umohnani8 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pkg/server/cluster_server.go`:
- Around line 300-307: Update the MachineOSConfig lookup in the layered-image
path of pkg/server/cluster_server.go: use a bounded context with a deadline
instead of context.TODO(), and return an empty image for every Get error,
including non-NotFound failures. Add a reactor in pkg/server/server_test.go
covering a non-NotFound MachineOSConfig Get error and assert that no layered
image is returned.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 6a8e2c2a-a78e-49fb-9c46-0055645c6fc7
📒 Files selected for processing (2)
pkg/server/cluster_server.gopkg/server/server_test.go
|
/retest |
|
The fix is not working. This is the AI analysis of the failure We can find a must gather file with the journal logs for the failed nodes and the served ignition config for the worker pool in this jira comment https://redhat.atlassian.net/browse/OCPBUGS-99751?focusedCommentId=17811358 |
…mage The MCS runs as a DaemonSet with per-pod informer caches. When a MOSC is deleted (Image Mode disabled), different pods receive the watch event at different times. A new node hitting a stale pod gets the wrong OS image, leading to a double pivot that can leave the node NotReady. Add a direct API verification in resolveDesiredImageForPool: after finding a MOSC in the informer cache, do a live GET to confirm it still exists before serving the layered image. This closes the race window with negligible latency cost (one small-object GET, only when a MOSC is cached for the pool). Signed-off-by: Urvashi <umohnani@redhat.com>
28918b0 to
70e9f45
Compare
|
/pipeline required |
|
Scheduling tests matching the |
|
@umohnani8: This pull request references Jira Issue OCPBUGS-99751, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@umohnani8: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Closes https://redhat.atlassian.net/browse/OCPBUGS-99751
- What I did
The MCS runs as a DaemonSet with per-pod informer caches. When a MOSC is deleted (Image Mode disabled), different pods receive the watch event at different times. A new node hitting a stale pod gets the wrong OS image, leading to a double pivot that can leave the node NotReady.
Add a direct API verification in resolveDesiredImageForPool: after finding a MOSC in the informer cache, do a live GET to confirm it still exists before serving the layered image. This closes the race window with negligible latency cost (one small-object GET, only when a MOSC is cached for the pool).
- How to verify it
Opt a pool into layering then opt it out. Scale up a new node and it to that pool, the node should not be using the layered image and should stay Ready after being added to the pool.
- Description for the changelog
Verify MOSC existence via API before serving layered image
Summary by CodeRabbit