Skip to content
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

Containerd configuration shim format problem #110

Closed
dierbei opened this issue Jun 30, 2023 · 5 comments · Fixed by #112
Closed

Containerd configuration shim format problem #110

dierbei opened this issue Jun 30, 2023 · 5 comments · Fixed by #112

Comments

@dierbei
Copy link
Contributor

dierbei commented Jun 30, 2023

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?

@Mossaka
Copy link
Member

Mossaka commented Jul 7, 2023

Could you please try putting the section

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

under the [plugins] section?

@dierbei
Copy link
Contributor Author

dierbei commented Jul 10, 2023

@Mossaka thanks for your advice.

I will try it according to what you said.

@dierbei
Copy link
Contributor Author

dierbei commented Jul 10, 2023

@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"

@dierbei
Copy link
Contributor Author

dierbei commented Jul 10, 2023

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?

@Mossaka
Copy link
Member

Mossaka commented Jul 10, 2023

Can I try to fix the docs?

Sure, go ahead!

dierbei added a commit to dierbei/containerd-wasm-shims that referenced this issue Jul 11, 2023
dierbei added a commit to dierbei/containerd-wasm-shims that referenced this issue Jul 11, 2023
Mossaka pushed a commit that referenced this issue Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants