Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Swap][Tests][KEP2400] Add swap serial stress tests, improve NodeConformance tests and adapt NoSwap behavior #123557

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

iholder101
Copy link
Contributor

@iholder101 iholder101 commented Feb 28, 2024

What type of PR is this?

/kind feature

Fixes #120798

What this PR does / why we need it:

This PR does the following:

  1. Havily refactors and cleans swap node-e2e tests.
  2. Adapt swap NodeConformance test to [KEP-2400] add no swap as the default option for swap #122745 which drops UnlimitedSwap and introduces NoSwap behavior.
  3. Adds serial tests for swap.

To expand on (3), two serial tests are now added which validate the following scenarios:

  1. "should be able over-commit the node memory" - a pod is deployed which stresses memory. The test expects that once the pod uses all of the node's memory some of its memory would be swapped away.
  2. "should be able to use more memory than memory limits" - a pod with memory limits stresses memory. Eventually it goes beyond its memory limits and instead of being OOM killed some of its memory is swapped away keeping it alive.

Special notes for your reviewer:

The original version of this PR was here: #120430

Due to unfortunate situations I had to be out of work for a while, therefore my PR was closed and continued here: #122175

Fortunately I was able to come back to work and therefore the PR is now continued here.

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

- [KEP]: https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/2400-node-swap/README.md

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Feb 28, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

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

@k8s-ci-robot k8s-ci-robot added area/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework area/test sig/node Categorizes an issue or PR as relevant to SIG Node. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Feb 28, 2024
@iholder101
Copy link
Contributor Author

/test pull-kubernetes-node-swap-fedora
/test pull-kubernetes-node-swap-fedora-serial
/test pull-kubernetes-node-swap-ubuntu-serial

@iholder101
Copy link
Contributor Author

PR is not ready to review yet.

/uncc @dchen1107 @andrewsykim

@kannon92
Copy link
Contributor

/cc

when it is ready

@iholder101 iholder101 force-pushed the swap/enhance-swap-functests-serial branch 3 times, most recently from 3b43518 to dd4dda6 Compare March 4, 2024 13:33
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 4, 2024
Signed-off-by: Itamar Holder <iholder@redhat.com>
Signed-off-by: Itamar Holder <iholder@redhat.com>
@iholder101 iholder101 force-pushed the swap/enhance-swap-functests-serial branch from 01107a6 to fd26dac Compare April 1, 2024 08:50
@iholder101
Copy link
Contributor Author

/test pull-kubernetes-node-swap-conformance-fedora-serial
/test pull-kubernetes-node-swap-conformance-ubuntu-serial

@iholder101
Copy link
Contributor Author

@kannon92 could you please have another look now that kubernetes/test-infra#32276 is merged and the swap conformance label is removed?

@kannon92
Copy link
Contributor

kannon92 commented Apr 1, 2024

/test pull-kubernetes-node-swap-fedora-serial
/test pull-kubernetes-node-swap-ubuntu-serial

@kannon92
Copy link
Contributor

kannon92 commented Apr 1, 2024

/test pull-kubernetes-node-swap-conformance-fedora-serial
/test pull-kubernetes-node-swap-conformance-ubuntu-serial

@kannon92
Copy link
Contributor

kannon92 commented Apr 1, 2024

tests look good now

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 1, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 69dd57e69a7ebb36963cc8ba100ca09ad1a10717

@kannon92
Copy link
Contributor

kannon92 commented Apr 1, 2024

/triage accepted
/priority important-soon

Let's get this into 1.31 as soon as it opens.

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Apr 1, 2024
@kannon92 kannon92 moved this from Needs Reviewer to Needs Approver in SIG Node PR Triage Apr 1, 2024
@kannon92 kannon92 moved this from Issues - In progress to PRs - Needs Approver in SIG Node CI/Test Board Apr 1, 2024
@iholder101
Copy link
Contributor Author

@mrunalp Would you mind taking a look?

@kannon92
Copy link
Contributor

/assign @mrunalp @SergeyKanzhelev @dchen1107

@SergeyKanzhelev
Copy link
Member

/retest

@k8s-ci-robot
Copy link
Contributor

@iholder101: 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
pull-kubernetes-node-swap-ubuntu-serial fd26dac link false /test pull-kubernetes-node-swap-ubuntu-serial
pull-kubernetes-node-swap-fedora-serial fd26dac link false /test pull-kubernetes-node-swap-fedora-serial

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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/test-infra repository. I understand the commands that are listed here.

@iholder101
Copy link
Contributor Author

/retest

Hey @SergeyKanzhelev!
Please note that the regular pull-kubernetes-node-swap-*-serial lanes are flaky.

We've introduced the new pull-kubernetes-node-swap-conformance-*-serial lanes, which are stable and run only swap-stress related tests, for that purpose. These tests pass continuously on this PR.

@pohly
Copy link
Contributor

pohly commented Apr 24, 2024

Is someone working on fixing this flakiness?

Fixing flakes should have more priority than adding more tests or features.

@iholder101
Copy link
Contributor Author

Is someone working on fixing this flakiness?

Fixing flakes should have more priority than adding more tests or features.

While I agree it's important, I think it's out-of-scope for this PR.

This PR does not affect the tests that these lanes are running, but rather adds new serial stress tests to run under pull-kubernetes-node-swap-conformance-*-serial lanes.

@kannon92
Copy link
Contributor

@pohly We are working on fixing flakyness in #sig-node-ci but bandwidth is limited. I don't think we can block all features in sig-node until we have a green CI.

Fixing flakes is complicated because each test can have a different reason. For example, we have a flake in our eviction tests (for at least two years) and we spent at least a few months working on fixing it. It turns out that there was a limitation in our cadvisor stats code which was reporiting wrong processes. We debated about fixing at the cadvisor level or at the stats level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note-none Denotes a PR that doesn't merit a release note. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
SIG Node CI/Test Board
PRs - Needs Approver
SIG Node PR Triage
Needs Approver
Development

Successfully merging this pull request may close these issues.

[KEP-2400] [Swap]: SwapConformance e2e testing
7 participants