Disable swap during system configuration#65
Open
wenxuan0923 wants to merge 4 commits intoAzure:mainfrom
Open
Conversation
7b16fbc to
4244604
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
kubelet has a hard requirement that swap be completely disabled.
vm.swappiness = 0ensures minimal swap usage but it didn't solve the root problem. We needswapoff -ato removes swap from/proc/swapsso kubelet can start properly.Sample error msg:
v-1 kubelet[12704]: I0205 10:58:14.917056 12704 manager.go:233] Version: {KernelVersion:6.8.0-94-generic ContainerOsVersion:Ubuntu 22.04.5 LTS DockerVersion: Docke>
Feb 05 10:58:14 bmoore-v-1 kubelet[12704]: I0205 10:58:14.917138 12704 server.go:772] "--cgroups-per-qos enabled, but --cgroup-root was not specified. defaulting to /"
Feb 05 10:58:14 bmoore-v-1 kubelet[12704]: I0205 10:58:14.917220 12704 swap_util.go:115] "Swap is on" /proc/swaps contents=<
Feb 05 10:58:14 bmoore-v-1 kubelet[12704]: Filename Type Size Used Priority
Feb 05 10:58:14 bmoore-v-1 kubelet[12704]: /swapfile file 3991548 0 -2
Feb 05 10:58:14 bmoore-v-1 kubelet[12704]: >
Feb 05 10:58:14 bmoore-v-1 kubelet[12704]: E0205 10:58:14.917245 12704 run.go:72] "command failed" err="failed to run Kubelet: running with swap on is not supported, please disable swap >
Feb 05 10:58:14 bmoore-v-1 systemd[1]: kubelet.service: Main process exited, code=exited, status=1/FAILURE
Feb 05 10:58:14 bmoore-v-1 systemd[1]: kubelet.service: Failed with result 'exit-code'.
Feb 05 10:58:15 bmoore-v-1 systemd[1]: kubelet.service: Scheduled restart job, restart counter is at 5.
Feb 05 10:58:15 bmoore-v-1 systemd[1]: Stopped Kubelet.
Feb 05 10:58:15 bmoore-v-1 systemd[1]: kubelet.service: Start request repeated too quickly.
Feb 05 10:58:15 bmoore-v-1 systemd[1]: kubelet.service: Failed with result 'exit-code'.
Feb 05 10:58:15 bmoore-v-1 systemd[1]: Failed to start Kubelet.