OCPNODE-4506: Migrate OCP-45351 ContainerRuntimeConfig pidsLimit test#31153
OCPNODE-4506: Migrate OCP-45351 ContainerRuntimeConfig pidsLimit test#31153Chandan9112 wants to merge 2 commits into
Conversation
|
Skipping CI for Draft Pull Request. |
|
@Chandan9112: This pull request references OCPNODE-4506 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. 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 controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdds a new disruptive Ginkgo e2e suite that tests ContainerRuntimeConfig by editing a worker node's /etc/crio/crio.conf, labeling its MachineConfigPool, creating a ContainerRuntimeConfig (pidsLimit: 2048), waiting for MCP rollout, and verifying the MCO-applied config overwrites the manual edit. Cleanup removes the CRC and label and waits for MCP convergence. ChangesContainerRuntimeConfig End-to-End Test Suite
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 10 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (10 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@test/extended/node/node_e2e/node.go`:
- Around line 186-210: Move the cleanup defer to immediately after you perform
the cluster mutations (right after the ContainerRuntimeConfig apply and the MCP
label) so it always runs even if subsequent steps fail; inside that defer do not
ignore errors — capture the return values from
oc.AsAdmin().WithoutNamespace().Run(...).Execute() for the delete and label
commands and assert they succeeded (use o.Expect(err).NotTo(o.HaveOccurred()) or
fail the test) and call imagepolicy.WaitForMCPConfigSpecChangeAndUpdated(oc,
"worker", cleanupSpec) using a cleanupSpec obtained via
imagepolicy.GetMCPCurrentSpecConfigName(oc, "worker") so the cleanup
consistently waits for the MCP to return to a known spec (reference
nodeutils.ExecOnNodeWithChroot, oc.AsAdmin().WithoutNamespace().Run("label"),
oc.AsAdmin().WithoutNamespace().Run("apply"), ctrcfgPidsLimitYAML, ctrcfgName,
and imagepolicy.WaitForMCPConfigSpecChangeAndUpdated).
- Around line 179-185: The current selection uses
oc.AsAdmin().WithoutNamespace().Run("get").Args(...
"-o=jsonpath={.items[0].metadata.name}") to pick the first worker but doesn't
verify it is Ready; change the logic to fetch the full node list (use
"-o=json"), parse the returned JSON, iterate .items and choose the first item
whose .status.conditions contains a Ready condition with status "True", and
assign that node name to workerNode (preserve the workerNode variable and the
surrounding g.By context). Ensure you still
o.Expect(err).NotTo(o.HaveOccurred()) and
o.Expect(workerNode).NotTo(o.BeEmpty()) after selecting a Ready worker.
🪄 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 YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 4c528ed6-cbf6-45c4-b734-3082da7159f9
📒 Files selected for processing (3)
test/extended/node/node_e2e/node.gotest/extended/testdata/bindata.gotest/extended/testdata/node/node_e2e/ctrcfg-set-pids-limit.yaml
|
Scheduling required tests: |
0b5ce2e to
5c8f44e
Compare
|
/retest |
|
Scheduling required tests: |
|
/retest |
|
|
||
| g.By("Get a ready worker node") | ||
| workers, err := exutil.GetReadySchedulableWorkerNodes(context.Background(), oc.AdminKubeClient()) | ||
| o.Expect(err).NotTo(o.HaveOccurred()) |
There was a problem hiding this comment.
All the o.Expect(err).NotTo(o.HaveOccurred()) have no context message.
It is harder triage in CI when a failure happens (you only see generic “expected no error”).
It is better if we start adding messages for failure, it will be easy while debugging
5c8f44e to
c5e0d58
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Chandan9112 The full list of commands accepted by this bot can be found 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 `@test/extended/node/node_e2e/node.go`:
- Around line 196-200: After running the sed edit via
nodeutils.ExecOnNodeWithChroot on workerNode, add an explicit verification step
that the change took effect before proceeding to MCO reconciliation: run another
nodeutils.ExecOnNodeWithChroot call against workerNode to read
/etc/crio/crio.conf (e.g., grep or awk for the expected log_level = "debug"
line) and use o.Expect on its output/error to fail the test if the pattern is
not present; place this check immediately after the sed invocation (referencing
the same workerNode and ExecOnNodeWithChroot usage) so the test cannot
false-pass if the sed did not modify the file.
🪄 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 YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 7aa20e50-6a01-4a61-b2dd-ee5bd245739c
📒 Files selected for processing (1)
test/extended/node/node_e2e/node.go
|
Scheduling required tests: |
c5e0d58 to
e627d3c
Compare
|
/retest |
|
Scheduling required tests: |
|
/retest |
1 similar comment
|
/retest |
|
Job Failure Risk Analysis for sha: e627d3c
|
|
/test e2e-vsphere-ovn-upi |
|
@Chandan9112: The following test 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. |
|
PR needs rebase. 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. |
Summary
Here is the test case link: Polarian-45351
Test Results
It passed successfully while executing on a live OCP 4.22 cluster:
Summary by CodeRabbit