cri-o: failed to mount container,error creating overlay mount to /var/lib/containers/storage/overlay merged invalid argument

Description I want to replace the runtime of k8s with cri-o. Successfully installed cri-o and cri-o-runc. I followed the example provided by https://github.com/kubernetes-sigs/cri-tools/blob/master/docs/crictl.md and executed the command crictl runp pod-config.json,the following error occurred.

Steps to reproduce the issue: 1.

cat <<EOF | sudo tee /etc/modules-load.d/crio.conf
overlay
br_netfilter
EOF

sudo modprobe overlay
sudo modprobe br_netfilter

cat <<EOF | sudo tee /etc/sysctl.d/99-kubernetes-cri.conf
net.bridge.bridge-nf-call-iptables  = 1
net.ipv4.ip_forward                 = 1
net.bridge.bridge-nf-call-ip6tables = 1
EOF

sudo sysctl --system

cat >>/etc/crio/crio.conf.d/02-cgroup-manager.conf<<EOF
[crio.runtime]
conmon_cgroup = "pod"
cgroup_manager = "cgroupfs"
EOF
  1. cat >>pod.json<<EOF{ "metadata": { "name": "nginx-sandbox", "namespace": "default", "attempt": 1, "uid": "hdishd83djaidwnduwk28bcsb" }, "log_directory": "/tmp", "linux": { } } EOF

  2. crictl runp pod.json

Describe the results you received: error message: Failed to create pod sandbox: rpc error: code = Unknown desc = failed to mount container.... error creating overlay mount to /var/lib/containers/storage/overlay merged invalid argument

Output of crio --version: image

**paste your output here**

image

Additional environment details (AWS, VirtualBox, physical, etc.): lsb_release -a image

Kubernetes v1.20.4 go 1.15 /usr/lib/cri-o-runc --version image

How can I solve this problem?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 36 (13 by maintainers)

Commits related to this issue

Most upvoted comments

we pin the various patch releases, which you can find here https://build.opensuse.org/project/subprojects/devel:kubic:libcontainers:stable

so you just choose the 1.20.x version you want and replace the source

@aclave1 excellent to hear! @ccnankai can you get me the output of crio config? I am guessing you have a similar problem as @aclave1 , and can fix it by taking out the metacopy=on in your storage.conf (or crio.conf)