-
Notifications
You must be signed in to change notification settings - Fork 39.9k
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
[Swap][Tests][KEP2400] Add swap serial stress tests, improve NodeConformance tests and adapt NoSwap behavior #123557
Conversation
Skipping CI for Draft Pull Request. |
/test pull-kubernetes-node-swap-fedora |
PR is not ready to review yet. /uncc @dchen1107 @andrewsykim |
/cc when it is ready |
3b43518
to
dd4dda6
Compare
dd4dda6
to
f21e542
Compare
@dchen1107 @kannon92 can you PTAL? |
/lgtm |
@@ -67,6 +66,13 @@ func InitFeatureGates(defaults featuregate.FeatureGate, overrides map[string]boo | |||
return nil | |||
} | |||
|
|||
func IsFeatureGateEnabled(feature featuregate.Feature) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you added documentation? Feature gate testing is one of those areas that have been misunderstood by test authors in the past.
I'll re-add LGTM and approve when done.
/lgtm cancel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pohly!
An important comment indeed. I'm also a victim of misunderstanding how it works :)
I've added the following documentation, let me know what you think:
// IsFeatureGateEnabled can be used during e2e tests to figure out if a certain feature gate is enabled.
// This function is dependent on InitFeatureGates under the hood. Therefore, the test must be called with a
// --feature-gates parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Based on #123557 (comment) and https://github.com/kubernetes/kubernetes/compare/f17c75d43d903c1e751564cfd0c739d770dbd43b..c3f16c512825c4340071efc5c90599cd6f11f77e.
/approve
For test/e2e/framework.
As https://github.com/kubernetes/kubernetes/pull/123557/files#r1525502183 shows, "node features" is in need of a cleanup - but not in this PR...
f17c75d
to
c3f16c5
Compare
Also, Remove wrong documentation about tempSetCurrentKubeletConfig() returning bool Signed-off-by: Itamar Holder <iholder@redhat.com>
Signed-off-by: Itamar Holder <iholder@redhat.com>
Signed-off-by: Itamar Holder <iholder@redhat.com>
Signed-off-by: Itamar Holder <iholder@redhat.com>
- Add getSleepingPod() helper function - Refactor: quantity functions to return resource.quantity instead of int64 - Improve helper functions for memory capacity Signed-off-by: Itamar Holder <iholder@redhat.com>
Signed-off-by: Itamar Holder <iholder@redhat.com>
Signed-off-by: Itamar Holder <iholder@redhat.com>
- Improve cgroup file read: execute from container instead of host - Clean unused variables/functions - BeTrue/BeFalse -> BeTrueBecause/BeFalseBecause - Use agnhost instread of stress image - Improve description and fix typo Signed-off-by: Itamar Holder <iholder@redhat.com>
Signed-off-by: Itamar Holder <iholder@redhat.com>
c3f16c5
to
e9b1a5e
Compare
LGTM label has been added. Git tree hash: 28577892d5393e726a040f7037ea93e709e7e02b
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: iholder101, mrunalp, pohly The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@iholder101: The following tests failed, say
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-sigs/prow repository. I understand the commands that are listed here. |
/retest |
What type of PR is this?
/kind feature
Fixes #120798
What this PR does / why we need it:
This PR does the following:
UnlimitedSwap
and introducesNoSwap
behavior.To expand on (3), two serial tests are now added which validate the following scenarios:
"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."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?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: