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
Replace disable_swap variable with kubelet_fail_swap_on #10036
Replace disable_swap variable with kubelet_fail_swap_on #10036
Conversation
|
Welcome @Manuelraa! |
Hi @Manuelraa. Thanks for your PR. I'm waiting for a kubernetes-sigs 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. |
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.
Hi thanks for the contribution!
I checked the code around accepting swap and actually there is already a "support" for that with disable_swap
although it feel kinda weird because you have to combine it with kubelet_fail_swap_on
.
I think we should just get rid of disable_swap
and replace it by kubelet_swap_on
IMO. We could also keep those two variables separate but I don't see any occurrence where it would make a lot of sense, so I don't think that would be necessary...
Also you would need to cleanup the kubelet_fail_swap_on | default(true)
replacing them by a simple kubelet_fail_swap_on
as this would be defined in kubespray-defaults/defaults/main.yaml
(if disable_swap
get replaced)
Oh sorry I missed Would you rather have both |
IMO keeping only |
/ok-to-test |
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.
Double approval 😱
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.
@Manuelraa Thank you, looks good to me 👍
Thanks. I still want to implement suggestion of @MrFreezeex #10036 (comment) At least I can't think of a usecase there Haven't come around yet run the test molecule on my hacky local dev environment. Bit of libvirt struggle. |
Feel free to let the CI does that for you btw (never done it myself tbh, I am usually using the CI to test or testing manually on a random test cluster beforehand) or even add this variable in a test in |
e97f346
to
bce9a4d
Compare
@@ -20,9 +20,6 @@ kubelet_kubelet_cgroups: "/{{ kube_service_cgroups }}/kubelet.service" | |||
kubelet_runtime_cgroups_cgroupfs: "/system.slice/{{ container_manager }}.service" | |||
kubelet_kubelet_cgroups_cgroupfs: "/system.slice/kubelet.service" | |||
|
|||
### fail with swap on (default true) | |||
kubelet_fail_swap_on: true |
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.
Hope this is fine. As far as I could see kubespray-defaults
is imported always before kubernetes/node
in the playbooks.
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 for this nice cleanup :D (the CI is broken atm, not your fault btw)
/lgtm
@@ -18,12 +18,10 @@ | |||
command: /sbin/swapoff -a | |||
when: | |||
- swapon.stdout | |||
- kubelet_fail_swap_on | default(True) |
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.
good catch 👍
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: floryut, Manuelraa, MrFreezeex 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 |
Thanks you too. In case there is still something to change/test let me know. // I also updated the PR title and description to match the change |
Hi @Manuelraa the CI should be fixed now, could you rebase your branch please? 🙏 |
bce9a4d
to
7cfba40
Compare
/lgtm |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Replace
disable_swap
variable withkubelet_fail_swap_on
.Swap will no longer be disabled if
kubelet_fail_swap_on: false
.Which issue(s) this PR fixes:
None
Special notes for your reviewer:
None
Does this PR introduce a user-facing change?: