- health 'mode' took the 30 s flock and mkdir'd the state dir; a held lock gave an empty
answer, which sync (OFF) read as 'not off' and reverted from the newest backup. mode is
now read-only and lock-free.
- apply's rewrite() truncated repo files in place and revert used cp -a over the file;
both now write a temp file and rename(2), so a concurrent dnf never sees half a file.
- apply/revert take the same lock as the health timer so a health run cannot rewrite
repo files while they edit them.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
- /etc/pkgcache-host.conf setting (PKGCACHE_ENABLED, PKGCACHE_URL, PKGCACHE_CA); no cache
host is built into the tool. sync/apply/revert/status; status shows mode.
- pkgcache-host-health.sh + 5 min timer (installed only while ON): probes repomd.xml and
.asc through the cache, 2 failures -> origin-only (reversible marker lines, atomic
rename under flock), 3 successes -> cache-first. Both-down is not counted.
- scripts/tests/pkgcache-host.test.sh
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
- build-push.yaml: Build-and-Push, Build-FPM-Images, Build-Shared-httpd
and Build-Shared-OLS probe https://192.168.1.40 and :5000 with the
pinned pkg-cache CA (5 s timeouts). When the cache answers they pass
PKG_CACHE and configure the BuildKit Docker Hub mirror (ca=). When it
doesn't, they build from upstream exactly as before and emit a warning.
Fallback measured from the runner bridge: refused <1 s, silent drop 10 s.
- scripts/host/pkgcache-host-repos.sh: apply/revert/status for WHP hosts.
Each rewritten repo uses baseurl=<cache> <origin> as the real fallback;
mirrorlist/metalink stay commented because measured dnf ignores baseurl
when they are present. Keeps gpgcheck=1 / repo_gpgcheck=1 and backs up
every file. Tested on 192.168.1.148, including cache-down and
silent-drop fallback.
- docs: runner firewall rule (applied), measured fallback results.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>