flannel icon indicating copy to clipboard operation
flannel copied to clipboard

Pods cannot start, kube-flannet-ds pod shows the message with "OCI runtime create failed"

Open arrcher opened this issue 3 years ago • 2 comments

After deploying flannel in fresh k8s cluster one of the pods constantly fails with the message

OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: process_linux.go:458: setting cgroup config for procHooks process caused: open /sys/fs/cgroup/kubepods.slice/kubepods-burstable.slice/kubepods-burstable-pod7cd213f2_19f2_44bb_90e7_abdb097d5ea4.slice/docker-24a247c30100464900b21fe5e06038fb9743b43a382a9b604e4cd18162854d4e.scope/memory.swap.max: no such file or directory: unknown

Expected Behavior

  1. kube-flannel-ds pods are up and running
  2. pods can be started

Current Behavior

  1. Currently one of the kube-flannel-ds pods constantly fails with the message mentioned above.
  2. no pods can be started. The message in pods log is
Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "cdecf1c40e8cba2d95663ae69bd6e7def100725d7487a0ef361ee1c64838df43" network for pod "nginx-deployment-585449566-9l92m": networkPlugin cni failed to set up pod "nginx-deployment-585449566-9l92m_default" network: open /run/flannel/subnet.env: no such file or directory

Steps to Reproduce (for bugs)

  1. Install k8s cluster by kubeadm (master node only)
  2. install flannel by kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
  3. see the problem described above

Environment

  • Flannel version: v0.14.0
  • Kubernetes version (if used): v1.21.1
  • Operating System and version: Ubuntu Server 20.04.2 LTS

Any suggestions/ recommendations how to address it?

Thank you

arrcher avatar May 18 '21 23:05 arrcher

maybe you need to configure those in the Kernel settings: https://docs.docker.com/engine/install/linux-postinstall/#your-kernel-does-not-support-cgroup-swap-limit-capabilities

miaoshixuan avatar May 20 '21 06:05 miaoshixuan

I configured it. My /etc/default/grub contains

GRUB_CMDLINE_LINUX_DEFAULT="maybe-ubiquity systemd.unified_cgroup_hierarchy=1 cgroup_enable=memory swapaccount=1"

and I see that for another processes in /sys/fs/cgroup Screen Shot 2021-05-20 at 10 55 23 AM

Another detail that might be relevant, I use containerd as CRI which is configured to use systemd as cgroup manager.

arrcher avatar May 20 '21 15:05 arrcher

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 25 '23 22:01 stale[bot]