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

"io.containerd.runc.v1" is not usable via CRI? #2701

Closed
colemickens opened this issue Oct 5, 2018 · 2 comments
Closed

"io.containerd.runc.v1" is not usable via CRI? #2701

colemickens opened this issue Oct 5, 2018 · 2 comments
Assignees
Milestone

Comments

@colemickens
Copy link

Description
Hello, I'm on the very latest revisions of runc, and containerd (and since my config includes it, the hyperhq/shimv2 version of kata)
The CRI portion of my configuration file looks like this:

  [plugins.cri]
    stream_server_address = ""
    stream_server_port = "10010"
    enable_selinux = false
    # TODO: update this
    sandbox_image = "k8s.gcr.io/pause:3.1"
    stats_collect_period = 10
    systemd_cgroup = false
    enable_tls_streaming = false
    max_container_log_line_size = 16384

    [plugins.cri.containerd]
      snapshotter = "overlayfs"
      # TODO: totally unclear which of the three attrs are needed/used/etc                                         
      [plugins.cri.containerd.default_runtime]
        runtime_type = "io.containerd.runtime.v1.linux"
        runtime_engine = ""
        runtime_root = ""
      [plugins.cri.containerd.runtimes.legacy] # works
        runtime_type = "io.containerd.runtime.v1.linux"
        runtime_engine = ""
        runtime_root = ""
     [plugins.cri.containerd.runtimes.runc] # doesn't work                                                         
        runtime_type = "io.containerd.runc.v1"
        runtime_engine = ""
        runtime_root = ""
      [plugins.cri.containerd.runtimes.kata] # works
        runtime_type = "io.containerd.runtime.kata.v2"
        runtime_engine = "io.containerd.runtime.kata.v2"
        runtime_root = ""
    [plugins.cri.cni]
      bin_dir = "/nix/store/3k72b3qs9iwhmlqrvjc6pgp968d6b0p1-cni-plugins-0.7.3/bin"                                
      conf_dir = "/nix/store/93my5lgsyhkvrg64mp4dn6gdhxl0fz7i-kubernetes-cni-config"        

ctr status

  • works: --runtime="io.containerd.runtime.v1.linux" (legacy?)
  • works: --runtime="io.containerd.runc.v1"
  • works: --runtime="io.containerd.kata.v2"

crictl status

  • works: --runtime="legacy" (aka io.containerd.runtime.v1.linux)
  • works: --runtime="kata" (aka io.containerd.kata.v2)
  • NOT working: --runtime="runc" (aka io.containerd.runc.v1)

When I fail to use io.containerd.runc.v1 via CRI (--runtime="runc"), I get these messages:

++ sudo crictl --debug runp --runtime=runc /tmp/pod-config.json                                                                                                                                                        
DEBU[0000] RunPodSandboxRequest: &RunPodSandboxRequest{Config:&PodSandboxConfig{Metadata:&PodSandboxMetadata{Name:redis-crictl-runc,Uid:redis-crictl-runcg,Namespace:default,Attempt:1,},Hostname:,LogDirectory:,DnsConfig:nil,PortMappings:[],Labels:map[string]string{},Annotations:map[string]string{},Linux:&LinuxPodSandboxConfig{CgroupParent:,SecurityContext:nil,Sysctls:map[string]string{},},},RuntimeHandler:runc,}               
DEBU[0000] RunPodSandboxResponse: nil
FATA[0000] run pod sandbox failed: rpc error: code = Unknown desc = failed to start sandbox container: failed to create containerd task: type with url containerd.linux.runc.RuncOptions: not found: unknown 

failed to start sandbox container: failed to create containerd task: type with url containerd.linux.runc.RuncOptions: not found: unknown

Is this expected, or have I misconfigured something?

@Random-Liu
Copy link
Member

The reason is that shim v2 is using a different option https://github.com/containerd/containerd/blob/master/runtime/v2/runc/options/oci.pb.go#L39.

We should support passing in different options based on the runtime in cri plugin.

@Random-Liu
Copy link
Member

@colemickens This will be fixed in containerd 1.2. See containerd/cri#943

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

No branches or pull requests

2 participants