Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 882289 - app-containers/docker fails to start on boot: containerd is already running
Summary: app-containers/docker fails to start on boot: containerd is already running
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-20 18:55 UTC by Patrick
Modified: 2024-09-19 09:52 UTC (History)
5 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 Patrick 2022-11-20 18:55:07 UTC
I'm not really sure how app-containers/docker and app-containers/containerd actually play together, but somehow the way they are currently started (with openrc) doesn't work on my box: When I add either only docker or docker + containerd into the default runlevel, containerd will always fail to start, and docker won't even try because it depends on containerd. Interestingly, the error message is:

  * start-stop-daemon: /usr/bin/containerd is already running

I've tried to find out how it would have already been started, but just can't find it - probably lack of debugging technique.

In any case, when I saw that the service dependency from docker to containerd was patched in (see https://gitweb.gentoo.org/repo/gentoo.git/tree/app-containers/docker/files/0001-Openrc-Depend-on-containerd-init-script.patch ) I just tried removing it, and it now works! Is it possible that this patch is no longer needed? And that I'm the only remaining user that uses both Docker and openrc? ;)

Reproducible: Always

Steps to Reproduce:
1. Install app-containers/docker-20.10.17 with openrc as init system
2. `rc-update add docker default`
3. Reboot
Actual Results:  
docker service fails to start

Expected Results:  
docker service starts
Comment 1 Tomáš Mózes 2023-01-11 05:58:07 UTC
Same here :)

[reboot]

...

# docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

# rc-status 
Runlevel: default
 docker                                                                                               [  stopped  ]

# /etc/init.d/docker start
 * Starting containerd ...
 * start-stop-daemon: /usr/bin/containerd is already running
 * Failed to start containerd                                                                                [ !! ]
 * ERROR: containerd failed to start
 * ERROR: cannot start docker as containerd would not start

# pkill -f container

# /etc/init.d/docker start
 * Starting containerd ...                                                                                   [ ok ]
 * Starting docker ...                                                                                       [ ok ]

Portage 3.0.36 (python 3.10.6-final-0, default/linux/amd64/17.1, gcc-11.3.0, glibc-2.35-r8, 5.15.80-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.15.80-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E5-2420_v2_@_2.20GHz-with-glibc2.35
KiB Mem:     4901208 total,   4274888 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Fri, 30 Sep 2022 18:45:01 +0000
Head commit of repository gentoo: dc12868d9ad81baa90a2bc1612e7b273e49de29f
sh bash 5.1_p16-r1
ld GNU ld (Gentoo 2.38 p4) 2.38
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r1::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.34.1-r3::gentoo
dev-lang/python:           3.10.6_p4::gentoo
dev-lang/rust:             1.62.1::gentoo
dev-util/cmake:            3.23.3::gentoo
dev-util/meson:            0.62.2::gentoo
sys-apps/baselayout:       2.8::gentoo
sys-apps/openrc:           0.45.2::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.71-r1::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.38-r2::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/gcc:             11.3.0::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.15-r3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.35-r8::gentoo

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -mtune=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -mtune=native -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="acl amd64 bzip2 cli crypt dri fortran gdbm iconv ipv6 libglvnd libtirpc mmx multilib ncurses nptl openmp pam pcre readline seccomp split-usr sse sse2 ssl unicode xattr zlib" ABI_X86="64" ADA_TARGET="gnat_2020" APACHE2_MODULES="authn_core authz_core authz_host dir mime socache_shmcb unixd actions alias deflate env expires filter headers include info log_config log_forensic mime_magic negotiation remoteip rewrite setenvif status access_compat authn_alias authn_anon authn_file authz_groupfile authz_owner authz_user auth_basic auth_digest cgi proxy proxy_http rewrite proxy proxy_http proxy_wstunnel ssl headers http2" APACHE2_MPMS="event" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx f16c mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

app-containers/containerd-1.6.8::gentoo was built with the following:
USE="cri seccomp -apparmor -btrfs -device-mapper -hardened (-selinux) -test" ABI_X86="(64)"
CFLAGS="-mtune=native -O2 -pipe"
CXXFLAGS="-mtune=native -O2 -pipe"
FEATURES="unknown-features-warn config-protect-if-modified unmerge-logs distlocks network-sandbox merge-sync userpriv usersandbox fixlafiles protect-owned strict buildpkg qa-unresolved-soname-deps assume-digests binpkg-docompress usersync ebuild-locks userfetch multilib-strict preserve-libs buildpkg-live unmerge-orphans xattr sandbox news binpkg-multi-instance binpkg-logs parallel-fetch pid-sandbox sfperms binpkg-dostrip ipc-sandbox"

app-containers/docker-20.10.17::gentoo was built with the following:
USE="cli container-init seccomp -apparmor -aufs -btrfs -device-mapper -hardened -overlay (-selinux)" ABI_X86="(64)"
CFLAGS="-mtune=native -O2 -pipe"
CXXFLAGS="-mtune=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"