Skip to content

OCPNODE-3751: Add automated tests for kubelet LimitedSwap drop-in configuration for CNV#30683

Closed
BhargaviGudi wants to merge 1 commit intoopenshift:mainfrom
BhargaviGudi:bgudi-swap-cnv
Closed

OCPNODE-3751: Add automated tests for kubelet LimitedSwap drop-in configuration for CNV#30683
BhargaviGudi wants to merge 1 commit intoopenshift:mainfrom
BhargaviGudi:bgudi-swap-cnv

Conversation

@BhargaviGudi
Copy link
Contributor

@BhargaviGudi BhargaviGudi commented Jan 13, 2026

This PR adds automated tests for the LimitedSwap feature using the /etc/openshift/kubelet.conf.d/ drop-in directory on CNV-enabled clusters.

Jira: https://issues.redhat.com/browse/OCPNODE-3751

Test Cases:
TC1: Verify silent creation and ownership of drop-in directory on CNV nodes
TC2: Verify kubelet starts normally with empty directory
TC3: Apply LimitedSwap configuration from drop-in file
TC4: Revert to NoSwap when drop-in file is removed
TC5: Verify control plane kubelets ignore drop-in config
TC6: Verify drop-in directory is auto-recreated after deletion
TC7: Validate security and permissions of drop-in directory
TC8: Verify cluster stability with LimitedSwap enabled
TC9: Verify non-CNV workers have no swap configuration
TC10: Apply correct precedence with multiple drop-in files
TC11: Maintain consistent configuration with checksum verification across CNV nodes
TC12: Handle LimitedSwap config gracefully when OS swap is disabled
TC13: Work correctly with various swap sizes
TC14: Expose swap metrics correctly via Prometheus

Changes
test/extended/node/node_swap_cnv.go - New test file with CNV swap tests
test/extended/node/node_utils.go - Helper functions for node operations and CNV lifecycle
test/extended/testdata/node/cnv-swap/ - Test data YAML files and README
pkg/testsuites/standard_suites.go - Added openshift/nodes/cnv suite definition

Running Tests
Run individual test
./openshift-tests run-test "[Jira:Node/Kubelet][sig-node][Feature:NodeSwap][Serial][Disruptive][Suite:openshift/nodes/cnv] Kubelet LimitedSwap Drop-in Configuration for CNV TC1: should verify silent creation and ownership of drop-in directory on CNV nodes
Run entire suite
./openshift-tests run openshift/nodes/cnv

All the testcases are passed with 4.22.0-0.nightly-2026-01-19-085729
I ran each test case individually and captured the outputs here.
Ran test suite and kept the output here

CI job:
http://github.com/openshift/release/pull/73670 WIP

@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 openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 13, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 13, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: BhargaviGudi
Once this PR has been reviewed and has the lgtm label, please assign stbenjam 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

@openshift-ci openshift-ci bot requested review from rphillips and sjenning January 13, 2026 11:49
@BhargaviGudi BhargaviGudi marked this pull request as draft January 13, 2026 12:25
@openshift-ci openshift-ci bot added the vendor-update Touching vendor dir or related files label Jan 19, 2026
@BhargaviGudi BhargaviGudi force-pushed the bgudi-swap-cnv branch 3 times, most recently from d4bcfb6 to 2a118b6 Compare January 19, 2026 09:07
@BhargaviGudi BhargaviGudi marked this pull request as ready for review January 20, 2026 09:53
@BhargaviGudi BhargaviGudi force-pushed the bgudi-swap-cnv branch 3 times, most recently from 07e10f5 to bcf5791 Compare January 20, 2026 10:32
@BhargaviGudi
Copy link
Contributor Author

/retest

@BhargaviGudi BhargaviGudi changed the title WIP Add automated tests for kubelet LimitedSwap drop-in configuration for CNV Add automated tests for kubelet LimitedSwap drop-in configuration for CNV Jan 20, 2026
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 20, 2026
@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

@cpmeadors
Copy link
Contributor

lgtm but I think the developer should give the real LGTM. @ngopalak-redhat

@haircommander
Copy link
Member

which suites are these running in?

@BhargaviGudi
Copy link
Contributor Author

which suites are these running in?
I have created new suite to run these testcases - > openshift/nodes/cnv
https://github.com/openshift/origin/pull/30683/files#diff-6f59ac4ffef01ed6ee14ebe27baed2d4eb20e438e60a5a32f42d795ac2683d32R414

@BhargaviGudi
Copy link
Contributor Author

/test e2e-metal-ipi-ovn-ipv6
/test e2e-aws-csi

@openshift-trt
Copy link

openshift-trt bot commented Jan 21, 2026

Job Failure Risk Analysis for sha: 054011d

Job Name Failure Risk
pull-ci-openshift-origin-main-e2e-metal-ipi-ovn-ipv6 IncompleteTests
Tests for this run (22) are below the historical average (3204): IncompleteTests (not enough tests ran to make a reasonable risk analysis; this could be due to infra, installation, or upgrade problems)

@ngopalak-redhat
Copy link
Contributor

/hold
We'll discuss about this #30683 (comment) with @cpmeadors and then unblock this.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 22, 2026
@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

@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

@BhargaviGudi
Copy link
Contributor Author

/retest-required

@rphillips
Copy link
Contributor

Perhaps I am missing it, but I do not see any of these tests being run in the prow jobs.

@BhargaviGudi
Copy link
Contributor Author

/retest

@cpmeadors
Copy link
Contributor

The latest changes look good. They address all the point discussed in a separate meeting. The refactoring of util functions is inline with what we discussed and I think the tests are much easier to read now. Hopefully additional tests for this feature will be easier to write now that we have a library of functions.

@BhargaviGudi
Copy link
Contributor Author

BhargaviGudi commented Feb 6, 2026

/retitle OCPNODE-3751: Add automated tests for kubelet LimitedSwap drop-in configuration for CNV

@openshift-ci openshift-ci bot changed the title Add automated tests for kubelet LimitedSwap drop-in configuration for CNV OCPNODE-3751: Add automated tests for kubelet LimitedSwap drop-in configuration for CNV Feb 6, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 6, 2026
@openshift-ci-robot
Copy link

openshift-ci-robot commented Feb 6, 2026

@BhargaviGudi: This pull request references OCPNODE-3751 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:

This PR adds automated tests for the LimitedSwap feature using the /etc/openshift/kubelet.conf.d/ drop-in directory on CNV-enabled clusters.

Jira: https://issues.redhat.com/browse/OCPNODE-3751

Test Cases:
TC1: Verify silent creation and ownership of drop-in directory on CNV nodes
TC2: Verify kubelet starts normally with empty directory
TC3: Apply LimitedSwap configuration from drop-in file
TC4: Revert to NoSwap when drop-in file is removed
TC5: Verify control plane kubelets ignore drop-in config
TC6: Verify drop-in directory is auto-recreated after deletion
TC7: Validate security and permissions of drop-in directory
TC8: Verify cluster stability with LimitedSwap enabled
TC9: Verify non-CNV workers have no swap configuration
TC10: Apply correct precedence with multiple drop-in files
TC11: Maintain consistent configuration with checksum verification across CNV nodes
TC12: Handle LimitedSwap config gracefully when OS swap is disabled
TC13: Work correctly with various swap sizes
TC14: Expose swap metrics correctly via Prometheus

Changes
test/extended/node/node_swap_cnv.go - New test file with CNV swap tests
test/extended/node/node_utils.go - Helper functions for node operations and CNV lifecycle
test/extended/testdata/node/cnv-swap/ - Test data YAML files and README
pkg/testsuites/standard_suites.go - Added openshift/nodes/cnv suite definition

Running Tests
Run individual test
./openshift-tests run-test "[Jira:Node/Kubelet][sig-node][Feature:NodeSwap][Serial][Disruptive][Suite:openshift/nodes/cnv] Kubelet LimitedSwap Drop-in Configuration for CNV TC1: should verify silent creation and ownership of drop-in directory on CNV nodes
Run entire suite
./openshift-tests run openshift/nodes/cnv

All the testcases are passed with 4.22.0-0.nightly-2026-01-19-085729
I ran each test case individually and captured the outputs here.
Ran test suite and kept the output here

CI job:
http://github.com/openshift/release/pull/73670 WIP

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.

@BhargaviGudi
Copy link
Contributor Author

/verified by @BhargaviGudi

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Feb 6, 2026
@openshift-ci-robot
Copy link

@BhargaviGudi: This PR has been marked as verified by @BhargaviGudi.

Details

In response to this:

/verified by @BhargaviGudi

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-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Feb 17, 2026
@BhargaviGudi
Copy link
Contributor Author

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 17, 2026
@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

Updated testcase codebase

Updated testcase codebase

Added openshift/nodes/cnv suite to differentiate the CNV-depedent testcases

Added suite details

Added appropriate labels to the testcases

Updated README

Removed unused files;Using yaml files

Using node-logs to get kubelet logs

kept original go.mod

chnaged kubelet to 1.34.1

Moved testcase to openshift/disruptive-longrunning suite

Revert go.mod and vendor/modules.txt to upstream/main versions
@BhargaviGudi
Copy link
Contributor Author

/verified by @BhargaviGudi

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Feb 17, 2026
@openshift-ci-robot
Copy link

@BhargaviGudi: This PR has been marked as verified by @BhargaviGudi.

Details

In response to this:

/verified by @BhargaviGudi

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
Copy link
Contributor

openshift-ci bot commented Feb 17, 2026

@BhargaviGudi: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-ovn-fips 28a0c08 link true /test e2e-aws-ovn-fips
ci/prow/go-verify-deps c6a51da link true /test go-verify-deps
ci/prow/verify-deps c6a51da link true /test verify-deps

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.

@BhargaviGudi
Copy link
Contributor Author

Closing this PR as I have created new PR due to verify-deps issue.

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. vendor-update Touching vendor dir or related files verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants