Microk8s crashed upon status check; Cgroup not enabled false warning
See original GitHub issueSummary
I checked microk8s status
and received crash error please check with mk inspect
, once checking with mk inspect
I receive warning mentioning cgroups is not enabled
but I believe I already have it enabled upon further inspection on all arm64 and amd64 devices.
What Should Happen Instead?
Expected behavior is for mk status
to give current microk8s cluster status with no issues since cgroups is already enabled on all nodes added to cluster context microk8s-cluster
.
Reproduction Steps
microk8s status
microk8s inspect
Introspection Report
` Inspecting system Inspecting Certificates Inspecting services Service snap.microk8s.daemon-cluster-agent is running Service snap.microk8s.daemon-containerd is running Service snap.microk8s.daemon-kubelite is running Service snap.microk8s.daemon-k8s-dqlite is running Service snap.microk8s.daemon-apiserver-kicker is running Copy service arguments to the final report tarball Inspecting AppArmor configuration Gathering system information Copy processes list to the final report tarball Copy disk usage information to the final report tarball Copy memory usage information to the final report tarball Copy server uptime to the final report tarball Copy openSSL information to the final report tarball Copy snap list to the final report tarball Copy VM name (or none) to the final report tarball Copy current linux distribution to the final report tarball Copy network configuration to the final report tarball Inspecting kubernetes cluster Inspect kubernetes cluster Inspecting dqlite Inspect dqlite
WARNING: The memory cgroup is not enabled. The cluster may not be functioning properly. Please ensure cgroups are enabled See for example: https://microk8s.io/docs/install-alternatives#heading--arm Building the report tarball Report tarball is at /var/snap/microk8s/3596/inspection-report-20220806_182428.tar.gz `
Can you suggest a fix?
I checked if cgroups was enabled on amd64 host shogun
and on one of my arm64 nodes calm-fox
ryzengrind@shogun:~$ cat /proc/mounts | grep "cgroup" cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot 0 0
ryzengrind@calm-fox:~$ cat /proc/mounts | grep "cgroup" tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755,inode64 0 0 cgroup2 /sys/fs/cgroup/unified cgroup2 rw,nosuid,nodev,noexec,relatime 0 0 cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,name=systemd 0 0 cgroup /sys/fs/cgroup/rdma cgroup rw,nosuid,nodev,noexec,relatime,rdma 0 0 cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0 cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0 cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0 cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0 cgroup /sys/fs/cgroup/misc cgroup rw,nosuid,nodev,noexec,relatime,misc 0 0 cgroup /sys/fs/cgroup/hugetlb cgroup rw,nosuid,nodev,noexec,relatime,hugetlb 0 0 cgroup /sys/fs/cgroup/pids cgroup rw,nosuid,nodev,noexec,relatime,pids 0 0 cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0 cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset,clone_children 0 0 cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0 cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
Not sure what next steps I should take to proceed here.
Are you interested in contributing with a fix?
yes
Issue Analytics
- State:
- Created a year ago
- Comments:13 (4 by maintainers)
Top GitHub Comments
This is a false alarm, the apiserver-proxy is only needed for MicroK8s worker nodes. There should be a
no-apiserver-proxy
file undervar/lock/
to signal this, but there does not seem to be any. The following should resolve the false alarm from themicrok8s inspect
. Could be worth reviewing the code to see how you got to this state however.In any case, the command below should help resolve your microk8s inspect alarm as well:
Thanks for following up.
This solved it for me. Is there any ongoing work towards a fix for that? Currently using
microk8s 1.25.3
from the1.25/stable
channel for testing, but I don’t plan on updating the prod servers until this is sorted out