Giter Club home page Giter Club logo

Comments (4)

lengrongfu avatar lengrongfu commented on May 27, 2024

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.

axkng avatar axkng commented on May 27, 2024

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.

estesp avatar estesp commented on May 27, 2024

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.

axkng avatar axkng commented on May 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.