Skip to content

OCPEDGE-2381: Verify etc pod should start with oom_score_adj as system-node-critical#30867

Open
kasturinarra wants to merge 1 commit intoopenshift:mainfrom
kasturinarra:automate_case_86080
Open

OCPEDGE-2381: Verify etc pod should start with oom_score_adj as system-node-critical#30867
kasturinarra wants to merge 1 commit intoopenshift:mainfrom
kasturinarra:automate_case_86080

Conversation

@kasturinarra
Copy link
Contributor

@kasturinarra kasturinarra commented Mar 12, 2026

Summary by CodeRabbit

Release Notes

  • Tests
    • Added test coverage to validate etcd Out-of-Memory (OOM) score adjustment settings across control-plane nodes.
    • Tests verify OOM score adjustment is correctly configured to -997 on each node in two-node cluster topologies.

@openshift-ci-robot
Copy link

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: automatic mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 12, 2026
@openshift-ci-robot
Copy link

openshift-ci-robot commented Mar 12, 2026

@kasturinarra: This pull request references OCPEDGE-2381 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 "4.22.0" version, but no target version was set.

Details

In 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.

@coderabbitai
Copy link

coderabbitai bot commented Mar 12, 2026

Walkthrough

Test file modified to add three new constants for etcd OOM configuration queries and two duplicate test blocks that verify etcd OOM score adjustment equals -997 across control-plane nodes via pcs resource checks and direct file reads.

Changes

Cohort / File(s) Summary
Etcd OOM Score Test Additions
test/extended/two_node/tnf_topology.go
Added constants getEtcdOOMScoreAdj, getPcsEtcdOOMDefault, and expectedOOMScoreAdj. Introduced test blocks verifying etcd oom_score_adj set to -997 on each control-plane node via pcs resource describe and direct proc file reads, duplicated across two test sections.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title references OCPEDGE-2381 and describes verifying etcd pod OOM score adjustment configuration, which aligns with the changeset's addition of three constants and two test blocks validating etcd oom_score_adj equals -997.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Stable And Deterministic Test Names ✅ Passed The test file contains static, deterministic test titles without dynamic values like pod names, timestamps, UUIDs, or node names.
Test Structure And Quality ✅ Passed The new test adheres to all five quality requirements specified. Each assertion includes meaningful failure messages with contextual information (node names, expected values). Setup is handled appropriately via the existing BeforeEach pattern, timeout protection is provided through DebugNodeRetryWithOptionsAndChroot's built-in retry mechanism, and the test follows established codebase patterns for node operations, client usage, and assertion structure. The test uses g.By() steps to logically separate verification phases, follows the same assertion style as existing tests in the file, and requires no cleanup since it only reads cluster state without creating resources.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.5.0)

Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions
The command is terminated due to an error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions


Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Mar 12, 2026

@kasturinarra: This pull request references OCPEDGE-2381 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 "4.22.0" version, but no target version was set.

Details

In response to this:

Summary by CodeRabbit

Release Notes

  • Tests
  • Added test coverage to validate etcd Out-of-Memory (OOM) score adjustment settings across control-plane nodes.
  • Tests verify OOM score adjustment is correctly configured to -997 on each node in two-node cluster topologies.

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.

@openshift-ci openshift-ci bot requested review from jeff-roche and qJkee March 12, 2026 11:46
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 12, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kasturinarra
Once this PR has been reviewed and has the lgtm label, please assign suleymanakbas91 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
test/extended/two_node/tnf_topology.go (1)

20-20: Remove redundant PCS metadata check or switch to live resource configuration.

pcs resource describe ocf:heartbeat:podman-etcd returns only OCF agent metadata and default parameter values, not the live per-resource-instance configuration in your cluster. The actual validation at lines 152-158 that reads /proc/$pid/oom_score_adj is the definitive end-to-end check. Either remove the PCS assertion (lines 145-150) and its const (line 20), or replace it with pcs resource show to verify the live resource instance configuration.

♻️ Minimal cleanup if removing the redundant check
-const getPcsEtcdOOMDefault = "pcs resource describe ocf:heartbeat:podman-etcd"
 const expectedOOMScoreAdj = "-997"
...
-		g.By("Verifying pcs resource describes etcd with OOM default of -997")
-		firstNode := nodes.Items[0]
-		pcsOutput, err := exutil.DebugNodeRetryWithOptionsAndChroot(oc, firstNode.Name, "openshift-etcd", "bash", "-c", getPcsEtcdOOMDefault)
-		o.Expect(err).To(o.BeNil(), fmt.Sprintf("expected pcs resource describe to succeed on Node %s: error %v", firstNode.Name, err))
-		o.Expect(pcsOutput).To(o.ContainSubstring("Default: -997"),
-			fmt.Sprintf("expected pcs resource describe to show OOM default of -997 on Node %s, got: %s", firstNode.Name, pcsOutput))
-
 		g.By("Ensuring etcd process OOM score adjustment is -997 on each node")
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/extended/two_node/tnf_topology.go` at line 20, The PCS metadata check is
redundant because const getPcsEtcdOOMDefault (the "pcs resource describe
ocf:heartbeat:podman-etcd" string) only returns agent metadata not live instance
config; either remove the const and the associated PCS assertion block that uses
it, or change the check to use "pcs resource show <resource>" (i.e., call pcs
resource show for the specific ocf:heartbeat:podman-etcd resource) so you
validate the live per-instance configuration instead of the OCF defaults; update
any references in tnf_topology.go to use the new command or remove them along
with the assertion that precedes the /proc/$pid/oom_score_adj validation.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@test/extended/two_node/tnf_topology.go`:
- Line 20: The PCS metadata check is redundant because const
getPcsEtcdOOMDefault (the "pcs resource describe ocf:heartbeat:podman-etcd"
string) only returns agent metadata not live instance config; either remove the
const and the associated PCS assertion block that uses it, or change the check
to use "pcs resource show <resource>" (i.e., call pcs resource show for the
specific ocf:heartbeat:podman-etcd resource) so you validate the live
per-instance configuration instead of the OCF defaults; update any references in
tnf_topology.go to use the new command or remove them along with the assertion
that precedes the /proc/$pid/oom_score_adj validation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3cd76ffb-11a8-4251-b953-4956df8efad6

📥 Commits

Reviewing files that changed from the base of the PR and between 0097787 and 7a768c8.

📒 Files selected for processing (1)
  • test/extended/two_node/tnf_topology.go

@kasturinarra
Copy link
Contributor Author

@dhensel-rh @jaypoulz could you please help review ? thanks !!

@openshift-ci-robot
Copy link

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

@kasturinarra
Copy link
Contributor Author

/retest

1 similar comment
@kasturinarra
Copy link
Contributor Author

/retest

@kasturinarra
Copy link
Contributor Author

/payload-job periodic-ci-openshift-release-main-nightly-4.22-e2e-metal-ovn-two-node-fencing-techpreview

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 13, 2026

@kasturinarra: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-nightly-4.22-e2e-metal-ovn-two-node-fencing-techpreview

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/58390e60-1eee-11f1-96d0-85647d1d0cd4-0

@pacevedom
Copy link
Contributor

/test e2e-aws-ovn-microshift

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 14, 2026

@kasturinarra: all tests passed!

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-trt
Copy link

openshift-trt bot commented Mar 14, 2026

Risk analysis has seen new tests most likely introduced by this PR.
Please ensure that new tests meet guidelines for naming and stability.

New Test Risks for sha: 7a768c8

Job Name New Test Risk
pull-ci-openshift-origin-main-e2e-aws-ovn-microshift High - "[Jira:"Cloud Credential Operator"] Cluster_Operator CCO is disabled [Suite:cco/conformance/parallel][OTP][PolarionID:68220] NonHyperShiftHOST-Critical-Leverage Composable OpenShift feature to make cloud-credential optional" is a new test that was not present in all runs against the current commit, and also failed 1 time(s).

New tests seen in this PR at sha: 7a768c8

  • "[Jira:"Cloud Credential Operator"] Cluster_Operator CCO is disabled [Suite:cco/conformance/parallel][OTP][PolarionID:68220] NonHyperShiftHOST-Critical-Leverage Composable OpenShift feature to make cloud-credential optional" [Total: 4, Pass: 3, Fail: 1, Flake: 0]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants