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
-
cat >>pod.json<<EOF{ "metadata": { "name": "nginx-sandbox", "namespace": "default", "attempt": 1, "uid": "hdishd83djaidwnduwk28bcsb" }, "log_directory": "/tmp", "linux": { } } EOF
-
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
:
**paste your output here**
Additional environment details (AWS, VirtualBox, physical, etc.):
lsb_release -a
Kubernetes v1.20.4
go 1.15
/usr/lib/cri-o-runc --version
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
- https://github.com/cri-o/cri-o/issues/5104#issuecomment-889649357 — committed to alvistack/ansible-role-cri_o by hswong3i 3 years ago
- fix(installer): Disable metacopy for cri-o Summary: metacopy breaks cri-o ubuntu 18.04 with the current releases. I'm not really sure what's wrong there but it's not possible to even create a pod wit... — committed to terragraph/tgnms by aclave1 3 years ago
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 themetacopy=on
in your storage.conf (or crio.conf)