-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Setup new node image with swap enabled #22453
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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. |
Welcome @ike-ma! |
Hi @ike-ma. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/ok-to-test |
- name: ci-kubernetes-node-kubelet-node-swap | ||
interval: 4h |
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.
We don't need a periodic test until the code merges (since we won't be able to enable the feature flag yet), but I'm fine with enabling this with the kubelet flag + swap enabled for now. It should be a no-op.
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.
Ack. I'll just remove this section for now then. Will add back when code is merged.
- --node-test-args=--feature-gates=DynamicKubeletConfig=true --kubelet-flags="--cgroups-per-qos=true --cgroup-root=/ --fail-swap-on=false" | ||
- --node-tests=true | ||
- --provider=gce | ||
- --test_args=--nodes=1 --focus="\[NodeAlphaFeature:NodeMemorySwap\]" |
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.
I've been avoiding using new NodeAlphaFeature tags where possible.
I think the focus of this test should be to run the full node e2e suite with swap on, per https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/2400-node-swap/README.md#test-plan
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.
Done. Updated to --focus="\[NodeConformance\]|\[NodeFeature:.+\]" --skip="\[Flaky\]|\[Slow\]|\[Serial\]"
similar to cgroup tests
- --gcp-project=k8s-jkns-pr-node-e2e | ||
- --gcp-zone=us-west1-b | ||
- --node-args=--image-config-file=/workspace/test-infra/jobs/e2e_node/image-config-swap.yaml | ||
- --node-test-args=--feature-gates=DynamicKubeletConfig=true --kubelet-flags="--cgroups-per-qos=true --cgroup-root=/ --fail-swap-on=false" |
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.
- --node-test-args=--feature-gates=DynamicKubeletConfig=true --kubelet-flags="--cgroups-per-qos=true --cgroup-root=/ --fail-swap-on=false" | |
- --node-test-args=--feature-gates=NodeSwapEnabled=true --kubelet-flags="--cgroups-per-qos=true --cgroup-root=/ --fail-swap-on=false" |
I'm not sure if we want the DynamicKubeletConfig flag on as we're deprecating it. We will definitely need NodeSwapEnabled for this to be able to test changes.
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.
Updated as suggested
- --node-test-args=--feature-gates=DynamicKubeletConfig=true --kubelet-flags="--cgroups-per-qos=true --cgroup-root=/ --fail-swap-on=false" | ||
- --node-tests=true | ||
- --provider=gce | ||
- --test_args=--nodes=1 --focus="\[NodeAlphaFeature:NodeMemorySwap\]" |
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.
Same comment as above re: focus.
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.
Done. Updated to --focus="\[NodeConformance\]|\[NodeFeature:.+\]" --skip="\[Flaky\]|\[Slow\]|\[Serial\]"
similar to cgroup tests
jobs/e2e_node/image-config-swap.yaml
Outdated
# `gcloud compute --project <to-project> disks create <image name> --image=https://www.googleapis.com/compute/v1/projects/<from-project>/global/images/<image-name>` | ||
# `gcloud compute --project <to-project> images create <image-name> --source-disk=<image-name>` | ||
images: | ||
ubuntu: #With1GSwap |
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.
Per the spec, we want to test two distros. Ubuntu is a great start, can we also do something RHEL-based?
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.
Done. Added fedora image with 1G swap and swap accounting enabled.
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.
Addressed previous comments, and added fedora support
- --gcp-project=k8s-jkns-pr-node-e2e | ||
- --gcp-zone=us-west1-b | ||
- --node-args=--image-config-file=/workspace/test-infra/jobs/e2e_node/image-config-swap.yaml | ||
- --node-test-args=--feature-gates=DynamicKubeletConfig=true --kubelet-flags="--cgroups-per-qos=true --cgroup-root=/ --fail-swap-on=false" |
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.
Updated as suggested
- --node-test-args=--feature-gates=DynamicKubeletConfig=true --kubelet-flags="--cgroups-per-qos=true --cgroup-root=/ --fail-swap-on=false" | ||
- --node-tests=true | ||
- --provider=gce | ||
- --test_args=--nodes=1 --focus="\[NodeAlphaFeature:NodeMemorySwap\]" |
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.
Done. Updated to --focus="\[NodeConformance\]|\[NodeFeature:.+\]" --skip="\[Flaky\]|\[Slow\]|\[Serial\]"
similar to cgroup tests
- --node-test-args=--feature-gates=DynamicKubeletConfig=true --kubelet-flags="--cgroups-per-qos=true --cgroup-root=/ --fail-swap-on=false" | ||
- --node-tests=true | ||
- --provider=gce | ||
- --test_args=--nodes=1 --focus="\[NodeAlphaFeature:NodeMemorySwap\]" |
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.
Done. Updated to --focus="\[NodeConformance\]|\[NodeFeature:.+\]" --skip="\[Flaky\]|\[Slow\]|\[Serial\]"
similar to cgroup tests
jobs/e2e_node/image-config-swap.yaml
Outdated
# `gcloud compute --project <to-project> disks create <image name> --image=https://www.googleapis.com/compute/v1/projects/<from-project>/global/images/<image-name>` | ||
# `gcloud compute --project <to-project> images create <image-name> --source-disk=<image-name>` | ||
images: | ||
ubuntu: #With1GSwap |
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.
Done. Added fedora image with 1G swap and swap accounting enabled.
- name: ci-kubernetes-node-kubelet-node-swap | ||
interval: 4h |
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.
Ack. I'll just remove this section for now then. Will add back when code is merged.
Fedora tests: Tested with kubetest (without FeatureGate for EnableNodeSwap)
Logged into the provisioned node and manually verified [Pass] 1G swap added
[Pass] Let container consumer more memory than requested, container will fail as expected when no swap allowed
[Pass] Let container consumer more memory than requested, container will succeed as expected when using unlimited swap (-1)
|
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.
I suggest that we add the manual tests you've written above to the e2e suite to be selected as part of Feature:NodeSwap
work.
/skip
/lgtm
* Support Ubuntu and Fedora * Tested with docker command on node
@ike-ma: The following test 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/test-infra repository. I understand the commands that are listed here. |
/skip |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ike-ma, sjenning 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 |
in general if you don't see an error that makes sense: expand the full log. from the end of the log:
the log highlighting is iffy, and can point you towards spurious errors that are not the real problem. |
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
/close |
@ehashman: Closed this PR. 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 kubernetes/test-infra repository. |
What type of PR is this?
/sig node
/priority important-soon
What this PR does / why we need it:
This PR
[x] Build images with swap for Ubuntu
[x] Add jobs to test-infra that use the images and enable the swap kubelet option for node e2e suite
Which issue(s) this PR fixes:
Context: kubernetes/enhancements#2400
Special notes for your reviewer: