Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 638268 - app-emulation/docker-17.10.0: service start fails
Summary: app-emulation/docker-17.10.0: service start fails
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Tianon
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-20 19:41 UTC by Andriy Utkin (RETIRED)
Modified: 2020-01-15 10:36 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andriy Utkin (RETIRED) gentoo-dev 2017-11-20 19:41:18 UTC
Reproduces with app-emulation/docker-17.10.0 and older.

Postinst doesn't complain about any missing kernel config options.

Workaround: comment out "ulimit -n 1048576" in start_pre(). I don't know why this helps.

Another workaround is to start "dockerd" directly from shell, or directly via start-stop-daemon, which is what init script implicitly does, I suppose:

/sbin/start-stop-daemon --start --exec /usr/bin/dockerd --pidfile /run/docker.pid --verbose --background --stderr /var/log/docker-err.log --stdout /var/log/docker-out.log -- -p /run/docker.pid


Console log demonstrating the issue:

19:04:19 Mon 20 Nov root@starlite ~
 # rc-service docker status
Authenticating root.
 * status: stopped
[ERR=3]
19:04:31 Mon 20 Nov root@starlite ~
 # rc-service docker start
Authenticating root.
 * Caching service dependencies ...                                                                                   [ ok ]
 * Starting docker ...
 * start-stop-daemon: fopen `/run/docker.pid': No such file or directory
 * Detaching to start `/usr/bin/dockerd' ...                                                                          [ ok ]
[OK]
19:04:35 Mon 20 Nov root@starlite ~
 # ps axfu | grep docker | grep -v grep
[ERR=1]
19:06:03 Mon 20 Nov root@starlite ~
 # rc-service docker status
Authenticating root.
 * status: crashed
[ERR=32]
19:06:44 Mon 20 Nov root@starlite ~
 # sed -i -e 's/ulimit -n/#&/' /etc/init.d/docker
[OK]
19:08:41 Mon 20 Nov root@starlite ~
 # rc-service docker restart
Authenticating root.
 * Caching service dependencies ...                                                                                   [ ok ]
 * Stopping docker ...
 * start-stop-daemon: fopen `/run/docker.pid': No such file or directory
 * Will stop /usr/bin/dockerd
 * Will stop processes of `/usr/bin/dockerd'
 * start-stop-daemon: no matching processes found                                                                     [ ok ]
 * Starting docker ...
 * start-stop-daemon: fopen `/run/docker.pid': No such file or directory
 * Detaching to start `/usr/bin/dockerd' ...                                                                          [ ok ]
[OK]
19:08:50 Mon 20 Nov root@starlite ~
 # ps axfu | grep docker | grep -v grep
root      6476  2.6  0.4 890000 39048 ?        Ssl  19:08   0:00 /usr/bin/dockerd -p /run/docker.pid --debug=true --log-level=debug
root      6492  0.3  0.1 609972  9020 ?        Ssl  19:08   0:00  \_ docker-containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/libcontainerd/containerd --shim docker-containerd-shim --runtime docker-runc --debug
[OK]
Comment 1 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2020-01-15 10:36:25 UTC
reopen if still actual.