#Dagger oddly seems to be systemd dependent?

1 messages · Page 1 of 1 (latest)

orchid inlet
#

I'm seeing runc run failed: unable to start container process: error during container init: error mounting "cgroup" to rootfs at "/sys/fs/cgroup": mount cgroup:/sys/fs/cgroup/elogind (via /proc/self/fd/6), flags: 0xf, data: elogind: invalid argument, which is not normal when running docker/podman containers

#

Elogind is logind extracted from the systemd-logind project, it's part of guix

twilit kraken
#

what container runetime do you currently use?

orchid inlet
#

I have docker and podman installed and working

#

I'm not using systemd, so this is 99% some cgroups-adjacent annoyance

#

i'm using runit, where cgroups v2 appears to be working

#

error mounting "cgroup" to rootfs at "/sys/fs/cgroup": mount cgroup:/sys/fs/cgroup/elogind this is odd

#

as I already have a mount at /sys/fs/cgroup/elogind as cgroup /sys/fs/cgroup/elogind cgroup rw,relatime,name=elogind 0 0

#

This can be "fixed" on void linux / probably all runit distros by setting CGROUP_MODE=unified in /etc/rc.conf

#

I'm not sure why it would fail under hybrid and work under unified though

#
# Set the mode for cgroup mounts.
# hybrid: mount cgroup v1 under /sys/fs/cgroup and
#         cgroup v2 under /sys/fs/cgroup/unified
# legacy: mount cgroup v1 /sys/fs/cgroup
# unified: mount cgroup v2 under /sys/fs/cgroup
#

is dagger trying to invoke docker rootless?

twilit kraken
#

dagger just invokes docker locally and runs a privileged container that needs the correct mounts to run other containers

orchid inlet
#

interesting

#

even more so, dagger on a fresh unified vm same distro works

twilit kraken
#

glad you managed to get unblocked 🙌

twilit kraken
orchid inlet
#

it just does exec.Command right?

#

i might be able to attach to the dagger engine and work out which invocation is causing it, that is if i can get it to reproduce at all

twilit kraken
twilit kraken
#

if you try to run docker-in-docker I'd assume you'll get the same error

#

if you look for that error in google, multiple users have gotten it with podman, docker, lima, etc in some specific kernels

orchid inlet
#

yeah i know its not dagger specific, i mean what docker command it's running to make it happen

twilit kraken
#

it's trying to run the dagger engine which depends on buildkit

#

if you run this docker run --rm --privileged registry.dagger.io/engine:v0.8.7 I'd assume you'll see it fail

orchid inlet
#

no thats the confusing part, after rebooting the issue has totally evaporated, even with hybrid cgroups

#

maybe I updated out of a bug or something, weird

twilit kraken
#

oh, I see... strange indeed

orchid inlet
#

annoying that there's no proper explanation and fix, but i guess its resolved

twilit kraken
#

resolving this thread 🙌

orchid inlet
#

so, this is not resolved, its back

#

this is the issue, i think

#

but that makes it buildkit's problem

#

just documenting it here