Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running kind/systemd in krun container fails #223

Open
ctrox opened this issue Oct 12, 2024 · 0 comments
Open

Running kind/systemd in krun container fails #223

ctrox opened this issue Oct 12, 2024 · 0 comments

Comments

@ctrox
Copy link

ctrox commented Oct 12, 2024

I tried running kind with the podman runtime set to krun and I'm getting the following error:

$ KIND_EXPERIMENTAL_PROVIDER=podman kind create cluster --retain
using podman due to KIND_EXPERIMENTAL_PROVIDER
enabling experimental podman provider
Creating cluster "kind" ...
 ✓ Ensuring node image (kindest/node:v1.31.0) 🖼
 ✗ Preparing nodes 📦
ERROR: failed to create cluster: could not find a log line that matches "Reached target .*Multi-User System.*|detected cgroup v1"

Looking at the logs of the node container I see the following:

$ podman logs kind-control-plane
INFO: changing snapshotter from "overlayfs" to "fuse-overlayfs"
INFO: enabling containerd-fuse-overlayfs service
Created symlink /etc/systemd/system/multi-user.target.wants/containerd-fuse-overlayfs.service → /etc/systemd/system/containerd-fuse-overlayfs.service.
INFO: ensuring we can execute mount/umount even with userns-remap
INFO: remounting /sys read-only
INFO: making mounts shared
INFO: detected cgroup v2
INFO: clearing and regenerating /etc/machine-id
Initializing machine ID from random generator.
INFO: setting iptables to detected mode: legacy
INFO: detected IPv4 address:
INFO: detected IPv6 address:
INFO: starting init
Couldn't find an alternative telinit implementation to spawn.

So kind fails at starting systemd inside the container. I have verified this by using a very minimal systemd container as described here: https://developers.redhat.com/blog/2019/04/24/how-to-run-systemd-in-a-container#enter_podman

Running such a container results in the same error. I think the issue boils down to krun using PID 1 for /init.krun and not the container entrypoint as other runtimes (e.g. crun) do. So I'm not entirely sure this is fixable at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant