From cddf7fc6c49949b24c202948d4b76cb95df0d785 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Wed, 14 Oct 2026 13:11:40 -0400 Subject: [PATCH] ci: database containers keep their data in tmpfs, not a leaked volume (#5746) postgres declares VOLUME /var/lib/postgresql/data, so each integration service container and each publish smoke Postgres left an anonymous volume behind: act_runner removes service containers without their volumes, and the smoke clean-up ran docker rm -f without -v. 2,488 of them, each a Postgres data directory of up to 130k files, used every inode on the runner host and stopped CI. A tmpfs at the data path creates no volume at all, and the clean-up now removes volumes too. Co-Authored-By: Claude Opus 5.5 --- .forgejo/workflows/ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index c9b8dd7..bb2c553 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -69,7 +69,12 @@ jobs: POSTGRES_USER: steward POSTGRES_PASSWORD: steward POSTGRES_DB: steward + # The data directory lives in RAM (#5746): postgres images declare + # VOLUME for it, so without a tmpfs each run left an anonymous volume + # that act_runner never removes, and 2,488 of them used up the runner + # host's inodes. options: >- + --tmpfs /var/lib/postgresql/data --health-cmd "pg_isready -U steward" --health-interval 10s --health-timeout 5s @@ -168,6 +173,7 @@ jobs: IMAGE=git.fabledsword.com/bvandeusen/steward:${{ github.sha }} docker network create --internal "$SMOKE-net" docker run -d --name "$SMOKE-pg" --network "$SMOKE-net" \ + --tmpfs /var/lib/postgresql/data \ -e POSTGRES_USER=steward -e POSTGRES_PASSWORD=steward -e POSTGRES_DB=steward \ postgres:16-alpine # Waits with deadlines (rule 156); pg_isready, not /dev/tcp, which is @@ -276,7 +282,7 @@ jobs: - name: Smoke clean-up if: always() run: | - docker rm -f "steward-smoke-${{ github.run_id }}-app" "steward-smoke-${{ github.run_id }}-restored" \ + docker rm -fv "steward-smoke-${{ github.run_id }}-app" "steward-smoke-${{ github.run_id }}-restored" \ "steward-smoke-${{ github.run_id }}-pg" >/dev/null 2>&1 || true docker network rm "steward-smoke-${{ github.run_id }}-net" >/dev/null 2>&1 || true - name: Prune dangling layers