DieterReuter / image-builder-rpi64

Build SD card image for Raspberry Pi 3 64bit
MIT License
156 stars 38 forks source link

Update cmdline.txt for memory cgroup #40

Closed ecliptik closed 6 years ago

ecliptik commented 6 years ago

v20171130-113423 sets /boot/cmdline.txt with cgroup_enable=memory, which does not setup the memory cgroup properly and causes kubeadm to fail pre-flight checks.

screen shot 2017-11-30 at 10 32 10 pm screen shot 2017-11-30 at 10 32 31 pm

This has changed in recent kernels according to https://archlinuxarm.org/forum/viewtopic.php?f=15&t=12086#p57035.

To fix this, /boot/cmdline.txtshould use cgroup_memory=1 instead.

Updated this on a v20171130-113423 Raspberry Pi and rebooted, and kubeadm passes pre-flight checks and setups up k8s properly.

ecliptik commented 6 years ago

@StefanScherer I think cgroup_enable=cpuset can stay, I didn't update it on my rpi nodes, just replaced cgroup_enable=memory with cgroup_memory=1 and kubeadm pre-flight checks all passed after that.

StefanScherer commented 6 years ago

@ecliptik Yes thanks. Just after typing my question I found it myself after looking closer to the keywords :-) I think @DieterReuter will merge your PR asap and publish a fixed release. Thank you!

ecliptik commented 6 years ago

Re-created my rpi cluster tonight using hypriotos-rpi64-v20180429-184538.img and when running kubeadm it failed with,

CGROUPS_MEMORY: missing                                                        
        [WARNING SystemVerification]: docker version is greater than the most recently validated version. Docker version: 18.04.0-ce. Max validated version: 17.03                
        [WARNING FileExisting-crictl]: crictl not found in system path                                                                                                            
Suggestion: go get github.com/kubernetes-incubator/cri-tools/cmd/crictl   
[preflight] Some fatal errors occurred: 
        [ERROR SystemVerification]: missing cgroups: memory
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`

Looking at the comments on the original kernel thread it seems the cgroup_memory=1 was kept for the 4.9.x kernels, but for newer kernels it went back to cgroup_enable=memory.

I updated /boot/cmdline.txt and changed cgroup_memory=1 to cgroup_enable=memory, rebooted and kubeadm passed all checks. Should probably revert #41 in order to use Kubernetes on images using 4.14 kernels