containers / crun

A fast and lightweight fully featured OCI runtime and C library for running containers
GNU General Public License v2.0
3.05k stars 309 forks source link

docker crun OCI runtime create failed #455

Closed eskuai closed 4 years ago

eskuai commented 4 years ago

Hello,

Docker starts ok with the updated config. I am trying to run docker with crun runtime, but i got a problem

root@darkstar ~]# docker run --rm -ti fedora  echo it works
docker: Error response from daemon: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/docker/containerd/daemon/io.containerd.runtime.v1.linux/moby/189cfde10bec56eec8100ff7c68682ba00c77d35ac90f354724e02c39a62c5f0/log.json: no such file or directory): fork/exec /usr/local/bin/crun : no such file or directory: : unknown.

my daemon.json

{
    "data-root": "/hdroot/dockerimages",
    "max-concurrent-uploads": 10,
    "max-concurrent-downloads": 10,
    "runtimes": { "crun": { "path": "/usr/local/bin/crun ", "runtimeArgs": [] } },
    "default-runtime": "crun"
}

and

[root@darkstar ~]# /usr/local/bin/crun
2020-08-17T11:01:25.000001149Z: please specify a command

What am i doing wrong?

Tx

giuseppe commented 4 years ago

what distro are you using? And what kernel version?

eskuai commented 4 years ago

Sorry, my mistake.

Fedora 32.  

Linux darkstar 5.8.1 #2 SMP PREEMPT Tue Aug 11 23:28:07 CEST 2020 x86_64 x86_64 x86_64 GNU/Linux

[root@darkstar ~]# docker version
Client:
 Version:           19.03.11
 API version:       1.40
 Go version:        go1.14.3
 Git commit:        42e35e6
 Built:             Sun Jun  7 21:16:58 2020
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          19.03.11
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.14.3
  Git commit:       42e35e6
  Built:            Sun Jun  7 00:00:00 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        

That docker version if Iremove crun config..

using crun config

Client:
 Version:           19.03.11
 API version:       1.40
 Go version:        go1.14.3
 Git commit:        42e35e6
 Built:             Sun Jun  7 21:16:58 2020
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          19.03.11
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.14.3
  Git commit:       42e35e6
  Built:            Sun Jun  7 00:00:00 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 docker-init:
  Version:          0.18.0
  GitCommit:        

fedora is running cgroups v1, ... systemd.unified_cgroup_hierarchy=0

Tx

giuseppe commented 4 years ago

no worries. How have you installed Docker? I can try to reproduce locally

eskuai commented 4 years ago

Using dnf

sudo dnf install docker-ce

why docker doesn't show any info about crun configuration from docker version as runc does?

Tx

giuseppe commented 4 years ago

you have an extra space after /usr/local/bin/crun:

"runtimes": { "crun": { "path": "/usr/local/bin/crun ", "runtimeArgs": [] } },

Please try with:

"runtimes": { "crun": { "path": "/usr/local/bin/crun", "runtimeArgs": [] } },

eskuai commented 4 years ago

so sorry @giuseppe yes, you right...

remove extra blank space and runs ok

[root@darkstar docker]#  docker run --rm -ti fedora  echo it works
it works

sorry for the noise

Tx