diff --git a/app/pyproject.toml b/app/pyproject.toml index 227ed7fa..85eae8cc 100644 --- a/app/pyproject.toml +++ b/app/pyproject.toml @@ -3,7 +3,7 @@ [project] name = "github-runner-image-builder" -version = "0.14.2" +version = "0.14.3" authors = [ { name = "Canonical IS DevOps", email = "is-devops-team@canonical.com" }, ] diff --git a/app/src/github_runner_image_builder/templates/cloud-init.sh.j2 b/app/src/github_runner_image_builder/templates/cloud-init.sh.j2 index b1e4cb8b..e9aebdda 100644 --- a/app/src/github_runner_image_builder/templates/cloud-init.sh.j2 +++ b/app/src/github_runner_image_builder/templates/cloud-init.sh.j2 @@ -195,6 +195,15 @@ function configure_system_users() { # removes /run/user/ once the last session ends. A runner started as a system service # has no login session, so linger is what keeps both alive. /usr/bin/loginctl enable-linger ubuntu + # The GARM agent runs the runner from that system service, so jobs lack what a login session + # provides (XDG_RUNTIME_DIR, the user D-Bus bus) and tools like skopeo and podman fall back to + # the root-owned /run/containers. A PAM session restores it, as `su -` did for the previous + # runner manager; systemd applies the drop-in once GARM installs garm-agent.service. + /usr/bin/mkdir -p /etc/systemd/system/garm-agent.service.d + /usr/bin/cat > /etc/systemd/system/garm-agent.service.d/login-session.conf < once the last session ends. A runner started as a system service # has no login session, so linger is what keeps both alive. /usr/bin/loginctl enable-linger ubuntu + # The GARM agent runs the runner from that system service, so jobs lack what a login session + # provides (XDG_RUNTIME_DIR, the user D-Bus bus) and tools like skopeo and podman fall back to + # the root-owned /run/containers. A PAM session restores it, as `su -` did for the previous + # runner manager; systemd applies the drop-in once GARM installs garm-agent.service. + /usr/bin/mkdir -p /etc/systemd/system/garm-agent.service.d + /usr/bin/cat > /etc/systemd/system/garm-agent.service.d/login-session.conf < +## [#245 Run the GARM agent in a login session](https://github.com/canonical/github-runner-image-builder-operator/pull/245) (2026-10-08) + +- Run the runner started by the GARM agent in a PAM login session, as the previous runner manager did with `su -`. The agent runs as a system service, so jobs had no `XDG_RUNTIME_DIR` or user D-Bus bus, and tools that keep per-user state there, such as `skopeo login`, `podman` and `buildah`, failed with `mkdir /run/containers: permission denied`. + ## [#244](https://github.com/canonical/github-runner-image-builder-operator/pull/244) (2026-09-23) - Ensure the `runner` group alongside the `runner` user.