New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CRI-Plugin crashes when defining other runtimes in imported config-file #9968
Comments
You can use follow config to set [plugins.'io.containerd.cri.v1.runtime'.containerd]
default_runtime_name = 'runc'
ignore_blockio_not_enabled_errors = false
ignore_rdt_not_enabled_errors = false
[plugins.'io.containerd.cri.v1.runtime'.containerd.runtimes]
[plugins.'io.containerd.cri.v1.runtime'.containerd.runtimes.spin]
runtime_type = "io.containerd.spin.v2"
[plugins.'io.containerd.cri.v1.runtime'.containerd.runtimes.spin.options]
BinaryName = "/bin/containerd-spin-shim-v2" |
Hi @lengrongfu , |
The error is in the containerd stdout/stderr when starting with your included config:
This error is due to the current merging strategy of imported config sections. It definitely had some drawbacks, and specifically, a contributor has been working on an improved strategy in a PR I'll link below. In the current implementation, your second file with definitions for a new runtime entry is effectively replacing, not adding to, the definitions for runtimes in the main file. If you move everything about CRI to the second file (the whole subtree of the config) then the CRI plugin works properly. More details in this PR: #9982 |
Hi @estesp ,
Containerd will restart with no errors and the CRI will be okay. |
Description
Hi,
I have recently worked on integrating WebAssembly runtimes in Kubernetes.
Part of that was to configure additional runtimes in containerd.
Lets assume the following config inside
/etc/containerd/config.toml
:The important part are the last four lines:
Initially I wanted to place those in a separate file like
/etc/containerd/config.d/webassembly.toml
However, if I do that the CRI plugin simply will not start and I could not find out why.
At first I thought I am doing things wrong in setting this up, but one day I was too lazy to put my config in the separate file and that is when things suddenly worked.
I went back and move those lines to the imported config again and CRI was crashing again.
I tried it with other settings like
discard_unpacked_layers = true
, which are working from imported configs.But those regarding the runtimes are not.
Seems like a bug to me.
Steps to reproduce the issue
ctr plugin ls
to see that the CRI plugin has crashedDescribe the results you received and expected
I was expecting that it does not make any difference in which config file I put my settings and containerd just keeps on working.
What version of containerd are you using?
containerd github.com/containerd/containerd 1.7.11 64b8a81
Any other relevant information
runc version 1.1.11
Show configuration if it is related to CRI plugin.
The text was updated successfully, but these errors were encountered: