deislabs / containerd-wasm-shims

containerd shims for running WebAssembly workloads in Kubernetes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Containerd configuration shim format problem

dierbei opened this issue · comments

commented

I moved the built containerd-shim-spin-v1 to /usr/local/bin/.

Then I try to modify the configuration file of containerd, the content is roughly as follows:

[metrics]
  address = ""
  grpc_histogram = false

[plugins.cri.containerd.runtimes.spin]
  runtime_type = "io.containerd.spin.v1"

[plugins]

  [plugins."io.containerd.gc.v1.scheduler"]
    deletion_threshold = 0
    mutation_threshold = 100
    pause_threshold = 0.02
    schedule_delay = "0s"
    startup_delay = "100ms"

  [plugins."io.containerd.grpc.v1.cri"]

But I encountered an error when I finally started containerd, the information is as follows:

# containerd
containerd: failed to load TOML from /etc/containerd/config.toml: invalid plugin key URI "cri" expect io.containerd.x.vx

how do i solve this problem?

Could you please try putting the section

[plugins.cri.containerd.runtimes.spin]
  runtime_type = "io.containerd.spin.v1"

under the [plugins] section?

commented

@Mossaka thanks for your advice.

I will try it according to what you said.

commented

@Mossaka I still got the same error.

~/containerd-1.7.2# containerd
containerd: failed to load TOML from /etc/containerd/config.toml: invalid plugin key URI "cri" expect io.containerd.x.vx

Below is my configuration:

[metrics]
  address = ""
  grpc_histogram = false

[plugins]

  [plugins.cri.containerd.runtimes.spin]
    runtime_type = "io.containerd.spin.v1"

  [plugins."io.containerd.gc.v1.scheduler"]
    deletion_threshold = 0
    mutation_threshold = 100
    pause_threshold = 0.02
    schedule_delay = "0s"
    startup_delay = "100ms"
commented

But I found a solution:

    [plugins."io.containerd.grpc.v1.cri".containerd]
      default_runtime_name = "runc"
      disable_snapshot_annotations = true
      discard_unpacked_layers = false
      ignore_rdt_not_enabled_errors = false
      no_pivot = false
      snapshotter = "overlayfs"

      # The following is the configuration I added for spin 
      [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.spin]
         runtime_type = "io.containerd.spin.v1"

To my surprise, I successfully created the Deployment.

Can I try to fix the docs?

Can I try to fix the docs?

Sure, go ahead!