OCPNODE-4506: Migrate OCP-45351 ContainerRuntimeConfig pidsLimit test#31153
OCPNODE-4506: Migrate OCP-45351 ContainerRuntimeConfig pidsLimit test#31153Chandan9112 wants to merge 1 commit 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 |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughAdds a disruptive Ginkgo e2e suite that edits a worker node's /etc/crio/crio.conf, labels its MachineConfigPool, creates a ContainerRuntimeConfig (pidsLimit: 2048), waits for MCP rollout, verifies the MCO-applied config overwrote the manual edit, and cleans up the CRC and label. ChangesContainerRuntimeConfig End-to-End Test Suite
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error, 2 warnings)
✅ Passed checks (9 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 |
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 |
Migrates the OTP test case OCP-45351 to openshift/origin. The test validates that ContainerRuntimeConfig pidsLimit is correctly applied by MCO, conmon is empty, and manual crio.conf edits are overwritten. Co-authored-by: Cursor <cursoragent@cursor.com>
e627d3c to
98d7eea
Compare
|
Scheduling required tests: |
|
/retest |
|
@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. |
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