Comments (4)
You can use follow config to set spin
runtime, and you can use containerd config default
command to generate default config. hope can help you.
[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"
from containerd.
Hi @lengrongfu ,
thank you for your comment.
The problem is however not to get a working config. I have that.
I am just reporting that if you set certain parameters in a config file that gets imported, the CRI plugin crashes, which seems like a bug to me.
I do not have a problem currently, this just seems faulty.
from containerd.
The error is in the containerd stdout/stderr when starting with your included config:
WARN[2024-04-04T18:30:37.688903174Z] failed to load plugin io.containerd.grpc.v1.cri error="invalid plugin config: no corresponding runtime configured in `containerd.runtimes` for `containerd` `default_runtime_name = \"runc\""
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
from containerd.
Hi @estesp ,
thank you for looking into this.
I can confirm that if I build my imported config like this it works:
[plugins."io.containerd.grpc.v1.cri".containerd]
default_runtime_name = "runc"
discard_unpacked_layers = true
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
runtime_type = "io.containerd.runc.v2"
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
SystemdCgroup = true
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.wasmedge]
runtime_type = "io.containerd.wasmedge.v1"
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.wasmedge.options]
BinaryName = "/bin/containerd-shim-wasmedge-v1"
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.spin]
runtime_type = "io.containerd.spin.v2"
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.spin.options]
BinaryName = "/bin/containerd-shim-spin-v2"
Containerd will restart with no errors and the CRI will be okay.
I must have overlooked the warning in the stdout/stderr of containerd initially. When I looked for it today, I found it of course.
I am curious to see how the PR works out in the end.
from containerd.
Related Issues (20)
- Executing 'nsenter -at pid' to enter a container does not generate any logs. HOT 1
- imageverifier plugin CLI Arguments format issue HOT 6
- io.containerd.grpc.v1.cri config does not migrate
- `containerd config default` uses `io.containerd.cri.v1.runtime`, while doc uses `io.containerd.grpc.v1.cri` HOT 2
- ctr pull images err archive/tar: invalid tar header: unknown HOT 5
- kubelet and containerd in endless loop for CreateContainer with unexpected media type octet-stream HOT 3
- Support Multiple Images Pinned against a common key
- Better error message, if host.toml contains a syntax error
- Error: no image was built
- Sandbox/Pause containers should run on a configurable cpuset to avoid interfering with low-jitter workloads
- RFC - [content-store] Commit should check first fsync() error HOT 1
- `docker checkpoint rm` does not actually remove the checkpoint files.
- Passing OpenTelemetry (otel) Env Vars to the Shim Runtime
- Support for Wasm OCI Artifacts HOT 2
- container-shim leaks sockets
- Report the use of components with vulnerabilities in containerd HOT 1
- `ctr images pull --all-platforms --local docker.io/library/hello-world:latest` fails: `ctr: mismatched image rootfs and manifest layers` HOT 7
- oss-fuzz integration is split across (at least) 3 repositories and is fragile HOT 4
- When the overlay volatile feature is enabled, creating a pod with an image configured with anonymous volumes will fail
- When the overlay volatile feature is enabled, creating a pod with an image configured with anonymous volumes will fail
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from containerd.