After the base image pulls, the first RUN step fails:
STEP 6/7: RUN ["/bin/sh", "-c", "apt-get update && apt-get install -y ..."]
error running container: from /usr/bin/crun creating container for [/bin/sh -c apt-get update ...]:
sd-bus call: Interactive authentication required.: Permission denied
Error: building at STEP "RUN ...": while running runtime: exit status 1
Podman had already warned about it:
level=warning msg="The cgroupv2 manager is set to systemd but there is no systemd user session available"
level=warning msg="Falling back to --cgroup-manager=cgroupfs"
The unit runs as a system service with User=ci-runner, so there is no
user@1000.service for podman or crun to ask for a scope. Delegate=yes gives the service
its own cgroup subtree, but nothing tells the runtime to use it, so crun falls back to
sd-bus and fails.
What fixed it here
As ci-runner, /var/lib/vole-runner/.config/containers/containers.conf:
[engine]
cgroup_manager = "cgroupfs"
Scope
- Decide where this belongs: a
containers.confthe package or template writes, a drop-in environment setting, or a documented step. Right now neitherdocs/deploy/runner.mdnordeploy/cloud-init/runner.yamlmentions cgroups at all. - Consider the alternative arrangement: run the runner as a user unit with
loginctl enable-linger, which gives podman the user manager it wants and leaves the cgroup manager alone. That changes the unit’s shape, so it is a design choice rather than a docs fix. - Note the interaction with
RuntimeDirectoryandXDG_RUNTIME_DIR=/run/vole-runner: a lingering user session would live at/run/user/1000, so the two cannot both be assumed.
Acceptance criteria
A clean machine following only the documented steps runs a job whose workflow starts a container, with no manual cgroup configuration and no sd-bus warning that changes the outcome.
Related: #237 and #239 come before this one; the three together are the difference between the documented runner setup working and a machine that fails at the first job.