The forge role takes out Docker's leftover packages, socket and group (FO-53) #86

Merged
pit merged 1 commit from hermes/FO-53-docker-leftovers into main 2026-11-05 11:34:40 +00:00
Owner

Addresses FO-53 (share of FO-48's "On 141, docker isn't installed").

Summary

forgejo/service/roles/forgejo/tasks/main.yml, §4a:

 - name: docker engine out — nothing on this Guest runs a container any more
   ansible.builtin.apt:
-    name: docker.io
+    name: [docker.io, docker-cli, docker-buildx, containerd, runc]
     state: absent
+
+- name: remove the engine's socket            # file /var/run/docker.sock absent
+- name: remove the docker group the engine's package created   # group docker absent

One apt call, packages named one by one, no autoremove (on 141 it would also take iptables, needrestart and a dozen libraries). The group goes after the existing task that takes git out of it. docs/architecture.md carries the why, in place of a comment. /var/lib/docker stays, as the ticket's out-of-scope says.

Evidence

Local: make check and make syntax-check green.

Rehearsed on PRE (fresh Guest, then Docker seeded by hand, since a fresh PRE never had it):

  • Before (after apt-get install docker.io and usermod -aG docker git on PRE): ii rows for docker.io, docker-cli, docker-buildx, containerd, runc; /usr/bin/docker; containerd and docker active; docker:x:107:; /var/run/docker.sock root:docker; git in docker.
  • Run 2 (make pre): changed=5: the group-membership task, the apt removal, the socket, the group, and the restart forgejo handler. Nothing else changed.
  • After: dpkg -l | grep -E 'docker|containerd|runc' shows only rc rows (containerd, docker.io); command -v docker finds nothing; systemctl is-active containerd inactive; getent group docker empty; socket gone; no containerd/dockerd processes; id git shows only git; forgejo active.
  • Run 3 (make pre): changed=0 in both the --check --diff pass and the real pass.
  • make pre-down: Destroy complete! Resources: 1 destroyed.

Not rehearsed (the Operator's, after merge): make service on 141 and the 141 checks in the ticket, make verify, and the runner row on 141's database staying online from 146. PRE has no Edge, no TLS and no Actions repos.

Merge Danger

Door: two-way. The merge changes no machine; the removal happens only when the Operator runs make service. Removed packages are reinstallable, and config files stay (rc, not purged).

Blast Radius: 141-only

The play restarts forgejo through the existing handler when it changes git's groups, the same as before. containerd is stopped by its package's removal, and on 141 nothing uses it any more (the runner is on 146).

Addresses FO-53 (share of FO-48's "On 141, `docker` isn't installed"). ## Summary `forgejo/service/roles/forgejo/tasks/main.yml`, §4a: ```diff - name: docker engine out — nothing on this Guest runs a container any more ansible.builtin.apt: - name: docker.io + name: [docker.io, docker-cli, docker-buildx, containerd, runc] state: absent + +- name: remove the engine's socket # file /var/run/docker.sock absent +- name: remove the docker group the engine's package created # group docker absent ``` One `apt` call, packages named one by one, no `autoremove` (on 141 it would also take `iptables`, `needrestart` and a dozen libraries). The group goes after the existing task that takes `git` out of it. `docs/architecture.md` carries the why, in place of a comment. `/var/lib/docker` stays, as the ticket's out-of-scope says. ## Evidence Local: `make check` and `make syntax-check` green. Rehearsed on PRE (fresh Guest, then Docker seeded by hand, since a fresh PRE never had it): - **Before** (after `apt-get install docker.io` and `usermod -aG docker git` on PRE): `ii` rows for docker.io, docker-cli, docker-buildx, containerd, runc; `/usr/bin/docker`; containerd and docker `active`; `docker:x:107:`; `/var/run/docker.sock` `root:docker`; `git` in `docker`. - **Run 2** (`make pre`): `changed=5`: the group-membership task, the apt removal, the socket, the group, and the `restart forgejo` handler. Nothing else changed. - **After**: `dpkg -l | grep -E 'docker|containerd|runc'` shows only `rc` rows (containerd, docker.io); `command -v docker` finds nothing; `systemctl is-active containerd` `inactive`; `getent group docker` empty; socket gone; no containerd/dockerd processes; `id git` shows only `git`; `forgejo` `active`. - **Run 3** (`make pre`): `changed=0` in both the `--check --diff` pass and the real pass. - `make pre-down`: `Destroy complete! Resources: 1 destroyed.` Not rehearsed (the Operator's, after merge): `make service` on 141 and the 141 checks in the ticket, `make verify`, and the runner row on 141's database staying online from 146. PRE has no Edge, no TLS and no Actions repos. ## Merge Danger **Door:** two-way. The merge changes no machine; the removal happens only when the Operator runs `make service`. Removed packages are reinstallable, and config files stay (`rc`, not purged). **Blast Radius:** 141-only The play restarts forgejo through the existing handler when it changes `git`'s groups, the same as before. containerd is stopped by its package's removal, and on 141 nothing uses it any more (the runner is on 146).
The forge role takes out Docker's leftover packages, socket and group (FO-53)
All checks were successful
plan / guest-plan-check (pull_request) Successful in 52s
plan / edge-plan-check (pull_request) Successful in 24s
pr-checks / env-check (pull_request) Successful in 20s
pr-checks / fmt-check (pull_request) Successful in 22s
pr-checks / validate (pull_request) Successful in 22s
pr-checks / syntax-check (pull_request) Successful in 22s
pr-checks / docs-check (pull_request) Successful in 22s
126599d71b
Removing docker.io alone left docker-cli, docker-buildx, containerd and
runc on 141, containerd still running. The removal names all five in one
apt call, and the stale socket and the empty docker group go with them.
No autoremove: on 141 it would also take iptables, needrestart and a
dozen libraries.
Member

Review started (round 1/5) on 126599d71b — reading the diff now.

**Review started** (round 1/5) on 126599d71baab7249af61f902551982d8e9cf85f — reading the diff now.
bot-minos approved these changes 2026-11-05 11:28:46 +00:00
bot-minos left a comment

repo olympus/infra-forge · PR #86 · reviewed head 126599d71b · round 1/5 · verdict: merge

Recommendation: merge

Spec: Vikunja FO-53 (project 4), read live, acceptance criteria as the contract; the PR body names FO-53 and the ticket carries no comments. Standards: AGENTS.md (§Code comments, §Docs, §Pull requests), docs/agents/workflow.md, docs/adr/0009 (this repo), olympus/workshop ADR 0011 read from main.

Spec

No findings.

FO-53 criterion Result
Removal task names the five packages in one apt call; make check and make syntax-check green Met. forgejo/service/roles/forgejo/tasks/main.yml:263-269 lists docker.io, docker-cli, docker-buildx, containerd, runc under one state: absent, with no autoremove. I ran make check at the head (rc 0) and ansible-playbook --syntax-check site.yml against both inventories/pre and inventories/prod in forgejo/service (rc 0 both).
Stale socket and empty docker group removed Met. Socket task at main.yml:271-274, group task at main.yml:276-279. The group task runs after "take the service user out of the docker group" (main.yml:250-257), so the group is empty when groupdel runs.
Rehearsed on PRE (seed Docker, run removes all five plus socket and group, second run changes nothing) Claimed in the PR body with per-run recaps (run 2 changed=5, run 3 changed=0 in check and real passes). Not reproduced: PRE needs the Proxmox credential this host does not hold. See unverified.
Live checks on 141 and make verify Not in this PR's reach. The body says so and leaves them to the Operator after make service.
Out of scope: /var/lib/docker, anything on 146 Respected. The diff touches neither, and the existing comment at main.yml:260-261 still holds.

Unrequested behaviour: none. The docs/architecture.md edit is the ticket's own reasoning, moved out of a code comment as AGENTS.md §Code comments asks.

Standards

No findings.

  • AGENTS.md §Code comments: the diff adds no comment. The why for "by package name, not autoremove" sits in docs/architecture.md:105-108, which is the docs page that rule asks for.
  • AGENTS.md §Pull requests: the body names FO-53.
  • docs/agents/workflow.md §2 (rehearse on PRE): the same code runs on PRE and PROD; no environment branching was added.
  • olympus/workshop ADR 0011 (a deploy never destroys or replaces) and this repo's ADR 0009 Consequences: the new removals are tasks in the role that the Operator runs with make service. This is the arrangement ADR 0009 already records for the docker.io removal, and nothing in .forgejo/workflows/ (plan.yml, pr-checks.yml) applies the service layer on merge. The body's Merge Danger claim, "the removal happens only when the Operator runs make service", holds.
  • make check (env-check, fmt-check, docs-check: 5 assertions) is green at the head.

Verified, and how

Claim How
Head is the dispatched one refs/pull/86/head fetched, equals 126599d71baab7249af61f902551982d8e9cf85f; worktree clean.
Diff is two files, +22/-4 git diff --stat 9bd8dea 126599d; matches the forge diff.
The three new/changed tasks are valid and idempotent on a clean machine Ran the same three tasks (list-form apt, file, group, all state: absent) with ansible-playbook --check --diff on localhost: ok=3 changed=0 failed=0.
Ticket's package list matches the diff FO-53 read live (task id 289): same five names.
Local syntax-check make syntax-check first failed on a missing community.postgresql collection in the review worktree. This is an environment gap, not the PR (the failing line main.yml:77 is untouched). After installing forgejo/service/requirements.yml into the worktree, the syntax check passes for pre and prod.
CI at the head Statuses at review time: plan/guest-plan-check and plan/edge-plan-check success, env-check success; fmt-check, validate, syntax-check and docs-check still pending. I did not wait on them; the local equivalents above are green.

Could not verify

  • The PRE rehearsal's removal path (the changed=5 run and the changed=0 rerun against a seeded Docker). It needs PRE credentials and a Guest. I can only say the tasks are well-formed and idempotent when Docker is absent. The author's recaps are internally consistent with the diff, but they remain the author's evidence.
  • Anything on 141 (criteria 3 and 4 of the ticket): the Operator's, after make service.

Summary

Axis Findings Worst
Standards 0 none
Spec 0 none

0 BLOCKER, 0 ADVISORY. The state follows the blockers: APPROVE; the label is review/merge-ready.

<!-- minos review-loop: repo=olympus/infra-forge pr=86 head=126599d71baab7249af61f902551982d8e9cf85f round=1/5 axes=standards,spec --> repo olympus/infra-forge · PR #86 · reviewed head 126599d71baab7249af61f902551982d8e9cf85f · round 1/5 · verdict: merge Recommendation: merge Spec: Vikunja FO-53 (project 4), read live, acceptance criteria as the contract; the PR body names FO-53 and the ticket carries no comments. Standards: `AGENTS.md` (§Code comments, §Docs, §Pull requests), `docs/agents/workflow.md`, `docs/adr/0009` (this repo), `olympus/workshop` ADR 0011 read from `main`. ## Spec No findings. | FO-53 criterion | Result | | --- | --- | | Removal task names the five packages in one `apt` call; `make check` and `make syntax-check` green | Met. `forgejo/service/roles/forgejo/tasks/main.yml:263-269` lists docker.io, docker-cli, docker-buildx, containerd, runc under one `state: absent`, with no `autoremove`. I ran `make check` at the head (rc 0) and `ansible-playbook --syntax-check site.yml` against both `inventories/pre` and `inventories/prod` in `forgejo/service` (rc 0 both). | | Stale socket and empty `docker` group removed | Met. Socket task at `main.yml:271-274`, group task at `main.yml:276-279`. The group task runs after "take the service user out of the docker group" (`main.yml:250-257`), so the group is empty when `groupdel` runs. | | Rehearsed on PRE (seed Docker, run removes all five plus socket and group, second run changes nothing) | Claimed in the PR body with per-run recaps (run 2 `changed=5`, run 3 `changed=0` in check and real passes). **Not reproduced**: PRE needs the Proxmox credential this host does not hold. See unverified. | | Live checks on 141 and `make verify` | Not in this PR's reach. The body says so and leaves them to the Operator after `make service`. | | Out of scope: `/var/lib/docker`, anything on 146 | Respected. The diff touches neither, and the existing comment at `main.yml:260-261` still holds. | Unrequested behaviour: none. The `docs/architecture.md` edit is the ticket's own reasoning, moved out of a code comment as `AGENTS.md` §Code comments asks. ## Standards No findings. - `AGENTS.md` §Code comments: the diff adds no comment. The why for "by package name, not `autoremove`" sits in `docs/architecture.md:105-108`, which is the docs page that rule asks for. - `AGENTS.md` §Pull requests: the body names `FO-53`. - `docs/agents/workflow.md` §2 (rehearse on PRE): the same code runs on PRE and PROD; no environment branching was added. - `olympus/workshop` ADR 0011 (a deploy never destroys or replaces) and this repo's ADR 0009 *Consequences*: the new removals are tasks in the role that the Operator runs with `make service`. This is the arrangement ADR 0009 already records for the `docker.io` removal, and nothing in `.forgejo/workflows/` (`plan.yml`, `pr-checks.yml`) applies the service layer on merge. The body's Merge Danger claim, "the removal happens only when the Operator runs `make service`", holds. - `make check` (env-check, fmt-check, docs-check: 5 assertions) is green at the head. ## Verified, and how | Claim | How | | --- | --- | | Head is the dispatched one | `refs/pull/86/head` fetched, equals `126599d71baab7249af61f902551982d8e9cf85f`; worktree clean. | | Diff is two files, +22/-4 | `git diff --stat 9bd8dea 126599d`; matches the forge diff. | | The three new/changed tasks are valid and idempotent on a clean machine | Ran the same three tasks (list-form `apt`, `file`, `group`, all `state: absent`) with `ansible-playbook --check --diff` on localhost: `ok=3 changed=0 failed=0`. | | Ticket's package list matches the diff | FO-53 read live (task id 289): same five names. | | Local `syntax-check` | `make syntax-check` first failed on a missing `community.postgresql` collection in the review worktree. This is an environment gap, not the PR (the failing line `main.yml:77` is untouched). After installing `forgejo/service/requirements.yml` into the worktree, the syntax check passes for pre and prod. | | CI at the head | Statuses at review time: plan/guest-plan-check and plan/edge-plan-check success, env-check success; fmt-check, validate, syntax-check and docs-check still pending. I did not wait on them; the local equivalents above are green. | ## Could not verify - The PRE rehearsal's removal path (the `changed=5` run and the `changed=0` rerun against a seeded Docker). It needs PRE credentials and a Guest. I can only say the tasks are well-formed and idempotent when Docker is absent. The author's recaps are internally consistent with the diff, but they remain the author's evidence. - Anything on 141 (criteria 3 and 4 of the ticket): the Operator's, after `make service`. ## Summary | Axis | Findings | Worst | | --- | --- | --- | | Standards | 0 | none | | Spec | 0 | none | 0 BLOCKER, 0 ADVISORY. The state follows the blockers: APPROVE; the label is `review/merge-ready`.
pit merged commit c2ff9ca9e9 into main 2026-11-05 11:34:40 +00:00
pit deleted branch hermes/FO-53-docker-leftovers 2026-11-05 11:34:40 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
olympus/infra-forge!86
No description provided.