yum update and docker: docker-runc not installed on system

General support questions
Post Reply
nabilG
Posts: 3
Joined: 2017/03/13 10:14:32

yum update and docker: docker-runc not installed on system

Post by nabilG » 2017/03/13 10:26:05

dear all,
I prefer to post here, instead of posting directly to the Docker forum, given the installed docker package is the one packaged by CentOS.
So I recently updated my CentOS distribution with yum update and this broke my docker installation.
since this update, I cannot start any docker container and I keep getting:

Code: Select all

/usr/bin/docker-current: Error response from daemon: shim error: docker-runc not installed on system.
I installed the runc package, but this did not really help.
I will appreciate any hint on how to move forward.

Here are my settings:
operating system:

Code: Select all

CentOS Linux release 7.3.1611 (Core) 
architecture:

Code: Select all

3.10.0-514.10.2.el7.x86_64 #1 SMP Fri Mar 3 00:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux


docker release:

Code: Select all

 rpm -qi docker
Name        : docker
Epoch       : 2
Version     : 1.12.6
Release     : 11.el7.centos
Architecture: x86_64
Install Date: Fri Mar 10 11:42:10 2017
Group       : Unspecified
Size        : 86527041
License     : ASL 2.0
Signature   : RSA/SHA256, Tue Mar  7 12:26:10 2017, Key ID 24c6a8a7f4a80eb5
Source RPM  : docker-1.12.6-11.el7.centos.src.rpm
Build Date  : Tue Mar  7 10:25:36 2017
Build Host  : c1bm.rdu2.centos.org
Relocations : (not relocatable)
Packager    : CentOS BuildSystem <http://bugs.centos.org>
Vendor      : CentOS
URL         : https://github.com/docker/docker

Code: Select all

 rpm -qi runc
Name        : runc
Version     : 1.0.0
Release     : 3.rc2.el7
Architecture: x86_64
Install Date: Mon Mar 13 11:39:58 2017
Group       : Unspecified
Size        : 5944233
License     : ASL 2.0
Signature   : RSA/SHA256, Tue Mar  7 12:29:30 2017, Key ID 24c6a8a7f4a80eb5
Source RPM  : runc-1.0.0-3.rc2.el7.src.rpm
Build Date  : Tue Mar  7 00:59:13 2017
Build Host  : c1bm.rdu2.centos.org
Relocations : (not relocatable)
Packager    : CentOS BuildSystem <http://bugs.centos.org>
Vendor      : CentOS
URL         : https://github.com/opencontainers/runc
Summary     : CLI for running Open Containers
Description :

nabilG
Posts: 3
Joined: 2017/03/13 10:14:32

Re: yum update and docker: docker-runc not installed on system

Post by nabilG » 2017/03/13 15:51:35

to give some additional inputs. I naively tried to link against the /usr/bin/runc

Code: Select all

ln -s /usr/bin/runc /usr/bin/docker-runc
then I get the following error message:

Code: Select all

/usr/bin/docker-current: Error response from daemon: oci runtime error: flag provided but not defined: -console.
Thanks for any valuable help here!

nabilG
Posts: 3
Joined: 2017/03/13 10:14:32

Re: yum update and docker: docker-runc not installed on system

Post by nabilG » 2017/03/14 14:28:30

In case someone hits the same issue, As it was pointed to me, this issue was raised on:

Code: Select all

https://access.redhat.com/solutions/2876431
And to solve this issue:

Code: Select all

cd /usr/libexec/docker/
sudo ln -s docker-runc-current docker-runc 

polyposix
Posts: 1
Joined: 2017/09/12 20:59:07

Re: yum update and docker: docker-runc not installed on system

Post by polyposix » 2017/09/12 21:11:04

So this page is kind of high on google for this problem, and I suspect the root cause is more due to old config files from upgrades than any problems with the actual centos upgrade.

While the symlink solution will work, a slightly more correct answer is to fix the config files for dockerd to get the right arguments passed to it either from /etc/docker/daemon.json, or from the systemd directory /etc/systemd/system/docker.service.d

In order for dockerd to find docker-proxy and docker-func it should be running like so: (output from ps)

/usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --exec-opt native.cgroupdriver=systemd --userland-proxy-path=/usr/libexec/docker/docker-proxy-current --selinux-enabled --log-driver=journald --signature-verification=false

If you're like me you have probably tweaked one or the other of those config locations, to set whatever options you want for dockerd. I found that after the upgrade, some of my tweaking got me into trouble and dockerd wasn't running with the add-runtime flags. Obviously you might have other config options specified, but I had stuff in my config that was causing those flags to be suppressed. Before you add the symlinks I suggest you check your config locations for problems.

Don't forget the daemon-reload if you are tweaking systemd.

sacha@akainix.com
Posts: 1
Joined: 2018/01/19 16:44:54

Re: yum update and docker: docker-runc not installed on system

Post by sacha@akainix.com » 2018/01/19 16:50:15

Thank you polyposix for your answer.
You show how it should be seen on ps output. Can you show an example on how to do it in a config file inside of /etc/systemd/system/docker.service.d ? Because this is exactly my case and I'm stuck on this step. By the way, the symlink didn't work for me.
I want to do the flag thing, but I don't know what to put in there.
Thanks,
Sacha.

Post Reply