Three fixes for runner reliability:
1. Fix service startup order (install_runner.yml)
- Move service.yml include BEFORE register.yml
- Previously, register.yml tried to start gitea-runner.service
before service.yml created the systemd unit file, causing
"Unit gitea-runner.service not found" on first install
- This only failed when registration actually happened (new runner);
on idempotent re-runs registration was skipped so the bug was masked
2. Restart runner after (re-)registration (register.yml)
- Add "Restart runner service after (re-)registration" task
- When a runner is re-registered (force-reregister or auto-recovery),
the service must be restarted to pick up the new .runner file
- The old premature start task was already removed; this adds it back
in the correct position (after service.yml has created the unit)
3. Docker daemon restart override (rootless_docker.yml)
- Add Restart=always, RestartSec=5, StartLimitIntervalSec=300,
StartLimitBurst=10 to both Docker service override blocks
- Upstream dockerd-rootless-setuptool.sh defaults to
StartLimitBurst=3 in 60s — too aggressive for OOM-prone hosts
- If Docker crashes 3 times in a minute, it stops restarting
permanently, taking the runner down with it
- New settings allow 10 restarts in 5 minutes, matching the
runner service's own restart policy
Note: Auto-recovery (--auto-recover-token) already exists in the CLI
and healthcheck script but defaults to disabled. Operators should pass
--auto-recover-token <token> during grm install to enable automatic
re-registration when runners become unregistered.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-24 04:23:54 +02:00
Emil SimeonovandDevin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The become_user pattern with sudo doesn't reliably connect to the
user's D-Bus session, causing systemd user timers (docker-prune,
runner-healthcheck) to silently fail to enable. This led to stale
Docker images accumulating and filling the disk on CI runners.
Switch all systemctl --user invocations to use runuser with explicit
XDG_RUNTIME_DIR and DBUS_SESSION_BUS_ADDRESS environment variables,
which correctly connects to the user's systemd session.
Affected tasks: prune timer, healthcheck timer, gitea-runner service,
rootless Docker daemon start/enable/restart, runner service restart.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- Fix register.yml premature service start (removed systemctl start before unit file exists)
- Replace broken inline Python in ci.yml auto-merge with devx.ci.wait_for_checks
- Bump devx from v0.50.0 to v0.50.5
GRM-161
The rewritten sync_wiki.py (devx 0.35.1) removed the --strict flag.
The new git-based approach is strict by default; --verify adds
post-sync page verification.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>