Make runner installer safe to resume
CI / tests-and-images (pull_request) Has been cancelled
Runner smoke test / runner-smoke (pull_request) Has been cancelled

This commit is contained in:
agent committed 2026-10-12 01:16:11 +03:00
1 parent 223e06ee77
commit b68421bb5b
7 files changed
+428 -72

No files matched your search

+29 -12
View File
@@ -49,16 +49,24 @@ for runner images/workspaces; and configures systemd services. It starts only
the separate rootless Docker daemon; the runner and health timer stay disabled
until repository registration. It does not change
SSH/UFW, production Docker configuration, application data, or production
secrets. It refuses to overwrite existing runner paths and requires at least
25 GiB free on `/` before reserving storage.
secrets. It can be rerun after partial setup: it validates and reuses an
existing runner account, subordinate ID mappings, image, and mount unit. An
existing image must be exactly 15 GiB and contain ext4; a mismatch stops the
installer without resizing or formatting it. The runner account must retain
a non-root system UID below `UID_MIN`, its expected home, primary group, and
sole supplementary group. The mount
is started only when it is not already active, and an active mount must be the
expected ext4 loop device backed by the runner image. Conflicting files or
state stop the installer for manual inspection. A new image requires at least
25 GiB free on `/`.
If the reviewed checkout is not present at the inventoried path, first verify
that the target is absent and clone the reviewed PR branch there. This path is
currently absent per the read-only audit; do not overwrite it if that changes.
that the target is absent and clone the reviewed `main` there. Do not overwrite
an existing checkout.
```bash
sudo test ! -e /opt/akyldash/current
sudo git clone --branch feature/infrastructure-deployment-phase-2 \
sudo git clone --branch main \
--single-branch https://git.vakanaut.ru/admin/akyldash.git \
/opt/akyldash/current
```
@@ -114,16 +122,22 @@ that token; do not put it in command-line arguments or environment variables.
Update `runner_version` and its expected official SHA-256 together in
`infra/runner/install-runner.sh`, review upstream release compatibility with
the installed Gitea, and open a PR. From the reviewed checkout, re-run the
installer only after resolving its existing-path guards. Do not replace the
binary while a job is active. Stop the runner, install/verify the new binary,
then start it and confirm Online plus a smoke run. Preserve `/var/lib/akyldash-runner/.runner`.
the installed Gitea, and open a PR. Do not replace the binary while a job is
active. Stop the runner, install/verify the new binary, then start it and
confirm Online plus a smoke run. Preserve `/var/lib/akyldash-runner/.runner`.
## Recovery and rollback
The runner is disposable: production data and secrets are not on its filesystem.
For a runner process failure, inspect `systemctl status` and
`journalctl -u akyldash-act-runner.service`; restart the fixed runner service.
If installation stops after creating or enabling the mount unit, inspect the
image and mount with `stat`, `blkid`, `findmnt`, and `losetup`, then rerun the
reviewed installer only when the image is 15 GiB ext4 and the active mount is
backed by it. The installer recognizes that state and does not format or
restart the mounted filesystem. If size, filesystem, unit contents, or backing
device differ, stop and resolve the state manually; never format the existing
image as a retry.
For lost/corrupt registration state, stop the service and obtain a fresh
repository-level token from Settings → Actions → Runners. Preserve the 15 GiB
data image and state for diagnosis; re-register only after the repository
@@ -133,6 +147,9 @@ automatic recovery step.
## Status
The configuration and scripts are prepared in Git. They have not been
installed on the VPS, a repository-level token is not available to this agent,
and no runner Online state or workflow execution is claimed yet.
The root installer and registration are incomplete. The owner reports that the
15 GiB ext4 loop-backed mount is active on `/dev/loop0` after manually running
`systemctl daemon-reload`, `enable`, and `start` when the first installer run
stopped at mount activation. This PR has not changed the VPS and does not claim
that remaining runner components are installed, a repository token is
available, the runner is Online, or a workflow has run.
+5 -2
View File
@@ -86,8 +86,11 @@ UFW rule details, and protected file metadata remain unverified.
3 GiB RAM, 512 processes), account slice limits (2.5 CPU, 4 GiB RAM, 2048
tasks), rotated file logs, and a systemd health timer. Jobs use the
`akyldash-ci` label and do not receive the rootless or production Docker
socket. This is repository code only: no runner package, account, store,
service, token, or registration is installed on the VPS.
socket. The owner reports a partial runner installation: the 15 GiB ext4
loop-backed store is active on `/dev/loop0` after manually enabling and
starting its mount unit when the installer stopped. Remaining components,
repository registration, and Online state are unverified; this PR makes no
VPS changes.
- Gitea repository runner inventory could not be read by the current API
principal (403). The owner has not supplied runner state, and no runner
Online status or runner-hosted workflow is claimed. The manual