question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Microk8s crashed upon status check; Cgroup not enabled false warning

See original GitHub issue

Summary

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

  1. microk8s status
  2. 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:open
  • Created a year ago
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
neoaggeloscommented, Sep 12, 2022
FAIL:  Service snap.microk8s.daemon-apiserver-proxy is not running

This is a false alarm, the apiserver-proxy is only needed for MicroK8s worker nodes. There should be a no-apiserver-proxy file under var/lock/ to signal this, but there does not seem to be any. The following should resolve the false alarm from the microk8s 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:

sudo touch /var/snap/microk8s/current/var/lock/no-apiserver-proxy

Thanks for following up.

0reactions
Pfleguschcommented, Nov 21, 2022
FAIL:  Service snap.microk8s.daemon-apiserver-proxy is not running

This is a false alarm, the apiserver-proxy is only needed for MicroK8s worker nodes. There should be a no-apiserver-proxy file under var/lock/ to signal this, but there does not seem to be any. The following should resolve the false alarm from the microk8s 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:

sudo touch /var/snap/microk8s/current/var/lock/no-apiserver-proxy

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 the 1.25/stable channel for testing, but I don’t plan on updating the prod servers until this is sorted out

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting - MicroK8s
If a pod is not behaving as expected, the first port of call should be the logs. First determine the resource identifier for...
Read more >
Troubleshooting kubeadm | Kubernetes
Go to github.com/kubernetes/kubeadm and search for existing issues ... Right after kubeadm init there should not be any pods in these states ...
Read more >
Use MicroK8s with Raspberry Pi in this tutorial - TechTarget
MicroK8s is a small Kubernetes distribution that can run on a Raspberry Pi 4. Follow this tutorial to learn how to use them...
Read more >
Deploying and Scaling Microservices with Docker and ...
... multiple machines running MicroK8s) - DNS is not enabled by default; ... will be `ready` (check cluster status with e.g. `scw k8s...
Read more >
LINSTOR 1.0 en - LINBIT
Enable LINBIT package repositories on your node. ... Check that there are no warnings from drbd-reactor service in the logs by running systemctl...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found