mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-30 14:56:11 +00:00
636701ac26c1ddcdacaa4d51b4afea6fa66054ad
10124
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
636701ac26 |
feat(ci): serialise a big deploy line's modes
GitHub cancels a job queued for 24h. A line starting swarm, compose and host at once queues its whole matrix in one go, so with more roles than runner slots the tail waits past that cut and dies unrun -- 54 of 241 jobs in run 30937913632. Deploy the modes one after the other instead, heaviest first, which restarts the queue clock per mode. cli.meta.ci.sequencing counts a line's matrix jobs on the row basis the discover steps use and serialises above INFINITO_CI_SEQUENTIAL_THRESHOLD; below it the modes still start together, so a small diff pays no wall-clock for this. A needs: edge is static, so both layouts exist as jobs and the decision skips one. Their conditions are structurally asserted, not evaluated: ten near-identical if expressions invite a copied sentinel or a missing chain edge, and both failures are silent at runtime. mode_fail_fast stops a serial line at its first failed mode, on by default. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
dd457083da |
fix(magento): get the install through, no Adobe keys needed
Five independent blockers, none of which the role could get past. 1. Credentials. create-project pulled the metapackage from repo.magento.com, which needs Adobe Marketplace keys; without them the bootstrap got HTTP 401 after 40 minutes of stack build. meta/schema.yml declared both keys with validation ^.*$, so an empty value passed inventory validation silently. mirror.mage-os.org serves the same packages unauthenticated and hosts the dists itself - verified on the deploy's own network path, HTTP 200 for project-community-edition-2.4.8.zip. Repository, package and version now live in meta/services.yml, which also makes a later switch to the Mage-OS distribution proper a data change rather than a code change. 2. Premature handler flush. The config renders notified 'compose up', so the handler chain ran before sys-stk-full had rendered compose.yml and the CA handler died on the missing file. Worse, the render had already created the instance directory, so the repo's own guard for exactly this (Fail: instance dir missing at handler flush) no longer tripped. 3. Anonymous volumes. Both markoshust images declare VOLUME /var/www while the named volume mounted one level deeper at /var/www/html, so docker created an anonymous volume per container and sys-ctl-hlth-volumes refused to start. The mount moves to /var/www, where the image declares it; the image ships an empty html/ that a fresh named volume initialises from. 4. Unescaped expansions. setup:install passed --db-host=\"$MYSQL_HOST\" and friends, but only the quotes were escaped for the outer shell, not the dollars. The DiD shell expanded them to empty, Magento fell back to localhost, took that as a unix socket and reported SQLSTATE[HY000] [2002]. 18 expansions. 5. A non-resumable bootstrap. create-project needs an empty target and cannot be retried, yet it carried the dependency download - and mirror.mage-os.org runs nginx with the default http2_max_requests=1000, so composer's ~490 requests on one connection hit GOAWAY mid-transfer at the same package twice in a row (curl error 18, not the flake it looked like). It is now create-project --no-install plus a retryable composer install, which resumes from the cache; measured succeeding in the live container after the abort. The creates: guards follow: composer.json marks the skeleton, bin/magento the finished install - it only exists once dependencies are in. MAGENTO_COMPOSER_SPEC folds package and version because autoformat broke the create-project line inside a Jinja expression; it rendered correctly by luck. Not fixed here: the base URL renders with a double slash, and the lifecycle stays pre-alpha - the role reaches setup:install now but has not yet served a page. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
dc08bc6212 |
fix(magento): make nginx and php-fpm actually serve
The role could not deliver anything. The markoshust nginx image ships a default vhost built for a different topology: fastcgi points at unix:/sock/phpfpm.sock, port 8000 only returns 301 to https, the real server sits on 8443 with a self-signed cert, and it references an upstream host 'phpfpm' that does not exist here - so nginx aborted at config load with 'host not found in upstream' and the container never started. php-fpm listened on that same unix socket, because its /usr/local/etc/php-fpm.conf carries no include line and php-fpm.d/*.conf is therefore dead config. Both are now replaced through type: config mounts. The role never had any - that absence is why every template it previously rendered was inert. The vhost stays minimal and includes Magento's own nginx.conf, copied from nginx.conf.sample by the bootstrap. Its location blocks carry the .php whitelist, the /static/version rewrites and the /media to get.php fallback that a hand-written vhost has to reimplement - the previous attempt did not, and would have executed every .php under pub/. PHP moves from 8.5 to 8.4: Magento 2.4.8 requires ~8.2.0||~8.3.0||~8.4.0 and the bootstrap passes no platform-requirement override, so composer create-project failed before nginx ever mattered. nginx waits for the php socket before starting, for the reason given in the erpnext frontend commit: the wildcard search domain turns a DNS miss into a routable wrong answer, and nginx pins upstreams at config load. Also: the oauth2 origin port named 8080, where nothing listens, and the healthcheck proved only that some listener existed - it stayed green on a redirect loop and on 502. Measured in a rebuild of the role topology against Magento's real nginx.conf.sample: HTTP 200 on / and /index.php, healthy healthcheck, and the counter-test - without the gate and with php down, nginx exits 1. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
e62e695876 |
chore(magento): drop the never-wired config layer
01_runtime_conf.yml rendered a nginx.conf and a php-fpm pool override that never reached a container: no task included the file, and meta/volumes.yml declares no mount for either output. Verified against HEAD in a second checkout - both templates were already dead there, so removing them changes runtime behaviour by exactly nothing. Their four path variables go with them, as do MAGENTO_PHP_HOST, MAGENTO_PHP_PORT and MAGENTO_NGINX_PORT, whose only consumers were the assert and the two templates. Closing the numbering gap renames 02_setup.yml to 01_setup.yml, the name it could not take while 01_runtime_conf.yml existed. This does not make the role work - it does not work today either. The markoshust nginx image cannot even start under this topology (host not found in upstream "phpfpm"), and its php-fpm listens on a unix socket rather than TCP 9000. Both are addressed separately. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
16a3632f6f |
fix(erpnext): gate the frontend on the backend socket
The frappe nginx entrypoint envsubsts BACKEND into a static upstream block, so nginx resolves the name once at config-parse time and pins the address for the container's life. When backend is briefly absent from docker's embedded DNS, libc does not return NXDOMAIN: it falls through to the infinito.example search domain, whose wildcard answers with the ingress host. nginx then starts successfully against an address nothing listens on and 502s forever. Observed in run 30937913632 from both directions: compose logged 93 identical connect-refused errors to 172.30.0.10:8000 over 31 minutes while the backend was healthy at 192.168.214.7, and all three swarm replicas logged the same against the manager IP with zero 200s. The compose trigger was the svc-bkp-volume-2-local backup, which stops and starts every container mounting a volume without regard to dependencies; in swarm, stack deploy drops depends_on outright. The gate probes TCP rather than DNS because the wildcard resolves the name either way. Five of the six other long-running services in this template already use the same bash -c gate idiom. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
044c511394 |
fix(magento): resolve volume mountpoint at runtime
Both creates: guards pointed at paths that could never match, so the bootstrap and setup:install shells re-ran on every deploy. The first guard went through docker_volume_path, which hardcodes /var/lib/docker/volumes/<name>/_data and misses any relocated docker data-root. The second was worse: path_join over the bare volume name produced a relative path, resolved against the Ansible working directory, which matched nowhere at all. Both now derive from the mountpoint the daemon reports. The stack-host gate moves to a single include, mirroring web-app-akaunting. With its last caller converted, docker_volume_path is deleted. It could not be repaired: a Jinja filter runs on the controller and cannot know a remote host's data-root. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
443496bee1 |
fix(akaunting): resolve volume mountpoint at runtime
AKAUNTING_SETUP_MARKER was built from docker_volume_path, which hardcodes /var/lib/docker/volumes/<name>/_data. The CI swarm lab relocates each node's docker data-root to /mnt/docker-fs/docker, so the marker touch hit ENOENT on a directory that was never there, while the volume itself sat healthy at the relocated path. Same root cause, silent: the marker stat reported exists=false on every relocated host, so the one-shot installer re-ran on each deploy. The mountpoint now comes from the daemon. The resolve sits behind sys-stk-full because on a genuine first deploy the volume does not exist yet and volume inspect would abort the very first install. The stack-host gate moved to a single include, so nothing evaluates the marker on hosts where the register is undefined. docker_volume_path stays for now; web-app-magento is its last caller and is converted in the follow-up. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
6b5388c091 |
fix(nfs-server): bootstrap centos ganesha repo
The inline repo definition pinned gpgkey to www.centos.org, a single non-CDN origin. In run 30937913632 it was unreachable for at least 17m25s and killed 2 of 23 centos ganesha installs; dnf's own retries=5 was already active on the host and did not help. centos-release-nfs-ganesha11 ships the same repo with metalink failover and gpgkey=file://, planting the key through Requires: centos-release-storage-common. Verified end to end against quay.io/centos/centos:latest and ghcr.io/kevinveenbirkenbach/pkgmgr-centos:stable. The BOOTSTRAP_BASEURL entry keeps the availability probe verifying both names instead of degrading them to an inconclusive warning. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
2e8c751da7 |
chore(bkp-volume): pull in baudolo 3.4.1
3.4.1 drops -b from the volume rsync, so a generation no longer keeps a file the source replaced or deleted between the hot and the cold pass as name~. That twin is what made the restore drill's elasticsearch unrecoverable: Lucene parses every file starting with segments as a radix-36 generation, so a restored segments_3~ leaves the shard store unreadable and .security-7 unallocatable, and the reserved elastic user then has no password hash to authenticate against. Only new generations are clean. A restore from one written before this bump still carries the twins. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
2540d37a62 |
fix(bkp): stop rsync from keeping superseded files as ~ twins
rsync -b turns a deletion into a rename, so a file the source dropped between two writes of the same generation survives as name~ beside the real one and is restored into live data. baudolo 3.4.1 fixes the copy that caused the elasticsearch restore failure; this is the sweep over the sibling call sites here. svc-bkp-remote-2-local is the live one: the rsync command is assembled once and re-executed up to twelve times against the same destination, which is created with exist_ok before the loop starts. A retry after a partial transfer is structurally the same second write as baudolo's hot/cold pair, only triggered by --timeout instead of a container stop. That path pulls other hosts' backups, and retries are its normal case rather than an exception. svc-bkp-local-2-device cannot fire today - it writes one pass into a directory named after the current second - but mkdir(exist_ok=True) makes a re-entry the same two-write case, so the flag goes rather than the argument for keeping it. The integration test mirrors the production command and follows. The lint is what makes this complete: it scans every tracked .py/.sh/.j2/.yml for a backup flag near an rsync token, and it found the integration test that the manual sweep had missed. It excludes exactly one file, its own, because the rule has to name the token it forbids; the sibling guard for || true avoids the same problem only by scanning .sh alone. Verified: make quality green across all four targets, the ssh-wrapper integration test passes with real rsync, and test-lint goes 307 -> 308 with the new guard collected. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
8e94002f17 |
fix(package-cache): restore apt slash redirect
The mirror failover turned the four apt locations into regex locations. nginx only synthesises the `/debian` -> `/debian/` redirect for prefix locations, so the slash-less form started answering 404. Inside a runner `deb.debian.org` is DNS-hijacked to this frontend and the URL reachability test probes exactly that form, which took the debian, fedora and centos workspace jobs down. The locations are prefix locations again, byte for byte as before. The only thing that stays is the error path: the named location picks up the already-rewritten `$uri` and rewrites it once more onto the mirror repo, so the failover survives without a capture variable. Measured against a simulated hijack: both bare paths 200 again, all four suite indexes 200, and with `apt-debian` pointed at a dead remote `dists/bookworm/InRelease` still arrives with 151 kB through apt-debian-mirror. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
f9dea42c68 |
fix(package-cache): survive a flaky apt mirror
A debian:bookworm workspace job died on `apt-get update`: the mounted sources list carried the Ubuntu entry too, Nexus had auto-blocked archive.ubuntu.com, and apt fails the whole update on one bad source. Three holes, three plugs: - One sources list per INFINITO_DISTRO under compose/package-cache/apt/, selected by the compose overrides. A Debian runner no longer fetches an Ubuntu suite it has no use for. The non-apt distros get an empty file so the bind mount has a source to point at. - autoBlock off. While a remote is auto-blocked Nexus answers `404 Remote Auto Blocked` to every client instead of falling back to the copy it already has cached. - Mirror failover in the frontend. Every apt suite gets a second proxy repo on an independent upstream; a 5xx from the primary re-runs the request against it. Nexus has no group repository type for apt, so the retry lives in nginx. Measured on a live Nexus 3.91.1: dead remote without a cached copy answers 502, with a cached copy 200 regardless of metadataMaxAge. The frontend serves 149 kB of real bookworm `Release` from the mirror repo when the primary is dead, and the new regex locations produce upstream request lines byte-identical to the `rewrite … break` form they replace, including `%3a` epochs in pool paths. INFINITO_CACHE_PACKAGE_APT_LIST is gone; the mount interpolates INFINITO_DISTRO directly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
f9d6f4525b |
fix(swarm-lab): give each node its own zfs pool name
In job 91983553540 all five lab nodes derived the same pool name, infinito_ci_unknown, and the run died on `cannot destroy 'infinito_ci_unknown': pool is busy`. The name came from `hostname`, which returns non-zero inside the node containers, so the `|| echo unknown` fallback answered for every one of them. One node won the race and created the pool; the others found it, took it for a leftover, and tried to tear down a pool a sibling was actively using. |
||
|
|
c9d8e85567 |
docs(bkp-volume,swarm-drill): describe the capture and drill as they now work
The role README claimed the backup machinery "operates transparently against the mount paths" and demoted the source-of-truth rule to advice in a prose box - both written before 2efc73d3b made that rule the code's behaviour. It now states what is enforced: this role skips export-backed volumes, svc-bkp-nfs-2-local is their single capture, and manager-pinned roles, roles forcing another compose_mode_force and nfs: false opt-outs stay covered here. It also names the limit the code actually has - the exclusion checks that some host is in the svc-bkp-nfs-2-local inventory group, not that the role ever ran successfully - because a README promising more than the code delivers is worse than one promising less. Its Schema section carried the role's timer flow; it now carries the mechanism the change set is about: meta/volumes.yml -> swarm_nfs_backed() as the single predicate -> its two consumers (the compose rewrite and the backup exclusion) -> the inventory-group gate -> the export host's single capture -> the restore path with its mountpoint probe -> the drill's [3b] guard against over-exclusion. The two swarm READMEs drew the drill with eight steps and pre-773a25ab6 semantics. Both now draw the nine that exist, including what makes the proof a proof: the pulled tree is wiped before the device recover, so the device holds the only copy left; the live export is wiped with the marker proven gone before it is restored; and [9] deletes the marker server-side before restoring the volume through its bound backing store. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
4fbde3b188 |
test(swarm-drill): prove the volume leg instead of staging a shadow restore
Three steps of the DR drill, one theme: every step now proves what it claims. [9] restored into the volume's mountpoint while the stack was down - a bare directory, because docker mounts a volume declaring its own backing store only while a container holds it. The payload landed on the node disk and the real mount shadowed it on the next deploy: success reported, nothing delivered, and roughly a gigabyte added to the very device the drill later runs out of. It now deletes the marker server-side, binds the backing store at the mountpoint, runs the recover CLI through it, and asserts the marker on the NFS server's own disk. That also exercises the positive branch of the guard from 773a25ab6 - its refusal path is unit-tested, its pass-through was tested nowhere. When the manager exposes no backing store the branch skips with a reason: docker volume inspect is node-local, and with replicas: 1 the volume object usually lives elsewhere. [3b] replaces a proof that used to happen by accident. The double capture 2efc73d3b removed also showed, incidentally, that the volume unit really writes - the drill found its marker in the volume repo too. The new step checks it directly: the newest backup-docker-to-local generation must be at least as new as DRILL_START_TS (taken on the manager, the same clock that names generations) and hold a non-empty file under a volume subtree. Its failure message names the suspicion it exists for: an exclusion that swallowed every volume. With no volume unit deployed it skips, tracked by VOLUME_TRIGGERED alongside the existing SECRETS_TRIGGERED. [5] prints du -sm per machine and repo when the space precondition fails, so the next red run names what fills the pulled tree instead of leaving it to arithmetic. Four adversarial review rounds found five defects in this block and confirmed each fix: an NFS mount reconstructed from driver options the codebase never emits (it is a bind), the recover CLI's second positional passed a volume name where it takes a host, a missing volume object aborting the drill instead of skipping, and an umount ordered before the return-code check, which under set -e would have killed the drill on a busy mount with no diagnostic and left the bind behind. None of this has run in a swarm yet. Every failure path is loud and names its cause. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
2e1057e4cd |
fix(bkp-volume): capture an NFS-backed volume once, not twice
Since the swarm-NFS migration two chains copied the same bytes: svc-bkp-nfs-2-local
reads the export from the NFS server's own filesystem, while baudolo on the manager
copied the same files again THROUGH the NFS mount. That was a migration leftover -
svc-bkp-nfs-2-local arrived in
|
||
|
|
0e8c535830 |
feat(ci): draw the data-root filesystem per distro
The pick was made once per matrix entry, in a workflow step ahead of the drill,
and every distro of that entry then ran on it. Coverage followed: one entry
exercised one filesystem, and the swarm never reached zfs at all, because
resolve.sh's userland_for() kept it out of any entry containing arch, centos or
fedora - which is every automatic sweep. The draw now happens inside the loop in
distros.sh, once per distro, so a five-distro entry covers zfs with 87% and all
three kinds with 62% probability instead of one kind with certainty.
The workflow input changes meaning with it. It was a single kind, offered as a
choice in the manual entry; it is now a space-separated allow-list. Empty draws
from all three, and naming kinds narrows the draw to them and marks the pick
required, so a host that cannot deliver one of them fails rather than quietly
running on something else. A name that is not a filesystem this project puts a
data root on is rejected outright instead of reaching the applying step.
For the draw to mean anything the images have to carry the userlands, so
scripts/install/zfs.sh becomes scripts/install/filesystem.sh and installs ext4
and btrfs alongside zfs. That is not symmetric work: btrfs-progs does not exist
in the EL family at all, because RHEL dropped btrfs, and a plain
`dnf install btrfs-progs` there fails the whole transaction and takes e2fsprogs
with it. EPEL carries it, so the EL family goes through EPEL from the start -
split by distro rather than by a failed first attempt, since Fedora has no
epel-release to fall back to and routing a transient failure there would turn it
into a fatal one. verify() now demands all four binaries, so a packaging
regression fails the build instead of leaving a hole the drill discovers later.
Measured on all five bases: debian trixie, ubuntu 26.04, arch, fedora 44 and
centos 10 each end with mkfs.ext4, mkfs.btrfs, zfs and zpool present and ldd
fully resolved.
Two defects only became reachable once a single job could ask for different
filesystems in turn:
* docker_dataroot.sh answered "already prepared" and returned for any mount it
found, so from the second distro on, every draw would have been silently
ignored on a host that survives the sweep - the runner in compose and host
mode. It now compares what is mounted against what was asked for and
dismantles the old root when they differ. Everything docker cached there
goes with it; that is what covering more than one filesystem per entry
costs.
* reclaim_stale_pool ran only when the new pick was zfs, so a zfs to btrfs
transition left the previous distro's pool imported on the shared kernel,
pinning a loop device over an image its dead container had already unlinked.
It now runs on every pick, which needed the /dev/zfs handling lifted out of
the zfs branch into zfs_device_ready().
The restore_docker trap is armed before anything can stop docker, rather than
after, so a failure while dismantling a data root cannot leave a host without a
daemon. resolve.sh splits its allow-list into an array before testing it, so a
whitespace-only input is the empty list it looks like rather than a narrowed one
that yields an empty pick marked required. pick.sh clears both keys when it
declines to draw: they are declared in default.env, so a generated .env carries
whatever was exported when it was made, and a caller gating its apply on the
value would otherwise repoint the developer's own docker in the very case the
skip exists to prevent.
Verified by execution rather than by reading: a privileged container ran
docker_dataroot.sh with real loop devices and mkfs through ext4 -> ext4 -> btrfs
-> ext4, confirming the recognition, the replacement in both directions and that
no loop leaks across it; a second harness with a recording zpool stub confirmed
that a btrfs pick does reclaim a stale pool, that no pool means no destroy, and
that a host without /dev/zfs still completes an ext4 pick without touching zpool.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
93eea4c415 | Autoformat | ||
|
|
ed1121053b |
feat(images): carry the zfs userland on all distros
dockerd's zfs graphdriver resolves `zfs` on PATH and opens /dev/zfs before it
accepts a data root (moby daemon/graphdriver/zfs/zfs.go:54,59), so the userland
has to sit in the image, not on the host. Only the apt images carried it, which
is why resolve.sh's userland_for() kept zfs out of every entry containing arch,
centos or fedora - that is every automatic swarm sweep, so the zfs data root and
the zfs branch of the backup launcher were never once exercised. Run
30781723102 shows it: "zfs left out: not every distro of this entry carries the
userland".
scripts/install/zfs.sh joins the three existing install scripts in the image
build and takes a different route per distro, each one run in a real container
of the matching base image before landing here:
debian trixie 2.3.2 zfsutils-linux, contrib enabled first
ubuntu 26.04 2.4.1 zfsutils-linux
arch 2.4.3 the AUR PKGBUILD, which configures --with-config=user
fedora 44 2.4.3 zfsonlinux repo plus a dummy zfs-kmod provider
centos 10 2.2.10 the same, from the epel path
The dummy is what keeps the RPM route usable: the `zfs` package carries an
ungated `Requires: %{name}-kmod`, so a plain `dnf install zfs` resolves through
zfs-dkms and installs 389 extra packages and 1.44 GB of kernel and toolchain to
build a module against a kernel the container never boots. Providing zfs-kmod
from an empty package keeps the same install at 60 packages with no kernel
package at all, and the transaction is checked afterwards so a regression fails
the build instead of bloating the image. The repository is removed again once
the userland is in, because the dummy pins one version and an upgrade would
otherwise re-resolve the kmod at deploy time.
Version drift against the host module is not a concern: zpool create enables a
feature only when the loaded module reports it through /sys/module/zfs/features
.pool (cmd/zpool/zpool_main.c, module/zcommon/zfeature_common.c), and libzfs
compares no versions at all (lib/libzfs/os/linux/libzfs_util_os.c:123-134), so a
newer userland degrades rather than breaking.
With every image carrying it, userland_for() and every_distro_carries() have
nothing left to decide and go. Two defects that only became reachable once zfs
could be drawn are fixed in the same move:
* /dev/zfs is a misc device, so the old lookup in /proc/devices could never
find its major and the node was never created. A node container's /dev is
populated at creation and udevd is masked, so nothing else fills the gap
either: the first bring-up of every job would have declined, blaming a
module that modprobe had just loaded. The minor now comes from /proc/misc.
* Pools live in the kernel the lab nodes share with the runner, while the
teardown only removes containers, and the node hostnames repeat across the
distro sweep. From the second distro on, zpool create hit the previous
iteration's pool. It is destroyed and its loop detached first.
The node image drops its own apt-only zfs branch and instead masks the six boot
units the userland enables by preset, which on a node can only fail: the pool is
created after boot.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
65d2aa028e |
feat(ci): emoji entry names and a symbol-framed manual run title
The three CI entry workflows drop the "⚡ CI:" prefix for one emoji each - 🕹️ Manual, 🔀 Pull Request, 📤 Push - completing the trigger triad by symbol. The manual run-name loses its prose prefix and separator dots; the segments now frame themselves: 🕹️ for the dispatch, 🐧 before the distro sweep, ⭐ for the priority line, 🎯 for a verbatim whitelist, 🔀 for diff derivation. before: Manual CI triggered: debian arch; web-app-x ⭐; diff-derived (origin/main) after: 🕹️ 🐧 debian arch ⭐ web-app-x 🔀 diff (origin/main) Dropping the dots removes the fixed literal after inputs.distros that utils/github/run_name.py cut the distro list at - the list is itself space-separated, and the next segment starts with a branch-dependent emoji. value_from_title therefore derives the terminator dynamically when the framing literal is whitespace-only: _openings_after collects what any later template segment can render first (the leading literal of each quoted string in later expressions, format placeholders stripped, plus later inter-expression literals) and cuts at the earliest occurrence. The SPOT property holds: the openings are read from the workflow's own run-name, so a future emoji change flows into the parser without touching it. Titles from before this change no longer match the template and yield '' - the documented unknown-title behaviour, so a retrigger of a pre-rename run falls back to the workflow's distro default instead of guessing. The dispatch CLI is unaffected (it targets entry-manual.yml by file name), job names and the orchestrator are untouched, and no workflow_run trigger references the old names. Required status checks configured against the old workflow names in repository settings are the one surface this repo cannot see - re-check them after the rename lands. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
31dda5adbc |
fix(mastodon): unblock the admin username in the DB, not in settings.yml
Mastodon moved its reserved-usernames list out of config/settings.yml into the
username_blocks table, seeded on every fresh install by
db/seeds/05_blocked_usernames.rb - 'administrator' included, along with admin,
root, owner, mod, staff and more. Shipped in v4.5.0 (2025-11-06); this repo is
exposed since
|
||
|
|
14b41c8025 |
fix(bkp-volume): refuse to restore into an unmounted backing store
Docker mounts a volume that declares its own backing store (Options set: nfs, cifs, bind) only while a container holds it. recover.py resolved the volume's Mountpoint and rsynced into it regardless, so with the consuming stack stopped - the state its own docstring demands - the payload landed on the node's disk under the bare mountpoint directory, and the next stack start mounted the real backing store over it: a restore that reports success, delivers nothing, and leaves an invisible, unreclaimable orphan behind. That orphan had weight. In run 30859490335 the swarm drill's [9/9] volume leg restored ~1 GiB of nextcloud_data onto the manager's 30 GiB loop device in exactly the minute the device crossed SeaweedFS's 2 GiB minFreeSpace floor - the last straw on a device already >=93% consumed (the sizing is ea14535f4) - after which every authenticated Nextcloud request died on an unwritable object store. recover.py now probes the mountpoint with `mountpoint -q` (over ssh for --docker-host) whenever the volume declares Options, and dies naming the mechanism and the way out instead of writing a single byte. Plain local volumes without Options keep the old path untouched - their _data directory on the node disk is the legitimate target. The drill skips its [9/9] volume leg for such volumes with the reason in the log: its data restore already happens in [8/9] straight into the NFS export, which is the restore path the role's README prescribes for NFS-backed volumes on swarm. The leg never proved anything for them - it only filled the disk. Three new unit tests pin the contract: unmounted refused, mounted accepted, remote probed via ssh with the exact command line. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
a3839e57f0 |
fix(swarm-lab): size the manager's docker loop device for what it hosts
Every lab node got an identical 30 GiB loop device because docker_dataroot.sh defaulted SIZE to 30G and no caller ever stated it. The swarm manager hosts the in-cluster registry, ~60 containers, and - by deliberate placement, since /data is NFS-unsafe - the SeaweedFS object store, whose sizing filter claims 14 GiB of slots plus a 2 GiB minFreeSpace floor. The idle nfs-server node got the same 30 GiB and used 1% of it. In run 30859490335 the manager's device stood at 30G/30G (98%), SeaweedFS crossed its floor at 02:04:45 and marked all 14 volumes unwritable, permanently. Nextcloud in variant 0 stores objects in that SeaweedFS via OBJECTSTORE_S3_*, so every authenticated page render performed an object write that failed as a 10-attempt assign ladder - 15 requests, 15 bursts of exactly 10, burst end matching the nginx 500 to the second. That is the "🐝 web-app-nextcloud 0" failure: 5 addon specs, 3 attempts each, all dead on the post-login page. The default is gone: SIZE is now a required argument and a missing value dies naming the call site. The swarm playbook states it per node - 60G for the manager, 30G for the rest. 60G covers the observed demand (>=31 GiB: a full device plus the denied writes) with headroom; the image is sparse, so the raised ceiling costs only what is actually written, and the runner-side watchdog at 6 GiB free remains the backstop. The compose and host workflows state their unchanged 30G explicitly. Not addressed here: what fills the first 28 GiB (registry + image layers + volumes composition is unmeasured - the rescue artifact holds exactly one df snapshot), and the drill-side shadow restore that supplied the last ~1 GiB; both are separate changes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
56e4792ca5 | test(nextcloud): fail fast on document 5xx | ||
|
|
a0e5710018 |
feat(nextcloud): route the application log to stderr
Nextcloud's log_type was never set, so the default 'file' applied and every application exception went to data/nextcloud.log on the NFS volume. The rescue diagnostics collect `docker logs` per service, which only ever saw the FPM access log - so an exception is invisible in CI artifacts. That cost a diagnosis. In run 30859490335, job 91840410448, the OIDC login completed (302 /login -> 302 /apps/oidc_login/oidc -> 303 with the code) and /apps/dashboard/ answered 500. The access log counts 15 x 303 against 15 x 500, i.e. five addon specs times three attempts, every single authenticated request failing - deterministic, not flaky. The trace holds only Nextcloud's generic error page, "More details can be found in the server log", and that log is not in the artifact. 'errorlog' sends the exception through PHP's error_log to FPM's stderr and from there into `docker logs`, which the existing collection already captures. No new collection code and no reads from the NFS volume. 'syslog' and 'systemd' would both need a socket inside the container. This does not explain the 500 in that run; it makes the next one explainable. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
04818cb190 |
fix(web-svc-cdn): create the staging tree instead of inheriting it
|
||
|
|
4f5cefcaf3 |
fix(nextcloud): retry the occ calls that write config.php
Three occ calls take an exclusive lock on config.php and gave up on the first
failure. In run 30830377785 the config:system:set batch hit
In Config.php line 306:
Could not acquire an exclusive lock on the config file
/var/www/html/config/config.php
after writing seven of nine values, and failed the swarm job. The same task ran
13 times across that run's swarm jobs and passed 12 times, including a second
fedora job on the same commit and topology, so the condition is transient rather
than a defect in the call.
maintenance:repair and app:update in 03_upgrade.yml already carry
retries/delay/until for this reason. This aligns the three that did not:
occ upgrade, maintenance:mode --off, and the config:system:set batch. The batch
is safe to repeat because config:system:set is idempotent and its `set -euo
pipefail` aborts at the failing call rather than continuing half-applied.
This does not mask the failure. Verified with a probe playbook of the same shape
(failed_when plus an until that never becomes true): the play ends failed=1 and
the downstream task does not run, so an exhausted retry still fails the deploy -
two attempts later than before.
The mechanism behind the lock error stays unproven: Config.php calls
flock(LOCK_EX) without LOCK_NB, which blocks rather than returning false, and no
errno appears in any of the 596 rescue-diagnostic files. A retry helps if the
condition is transient and does not if the NFSv4 lock layer returns a hard
error. That is why this is a mitigation of an ~8% flake, not a fix for a proven
cause.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
fc0d7c95b0 |
Revert "fix(nextcloud): render system config instead of setting it via occ"
This reverts commit 41063206a.
It broke every swarm nextcloud deploy. system.config.php.j2 opened with
<?php
{%- macro php_str(value) -%}
and the leading dash strips the newline after `<?php`, so under Ansible's
trim_blocks the file renders as `<?phpreturn [`. Run 30848540165:
ParseError: syntax error, unexpected token "=>", expecting "]"
in /var/www/infinito/system.config.php:2
#0 /var/www/html/lib/private/Config.php(229): include()
Config->readData() includes the file, so occ upgrade, every later occ call and
every php-fpm request died on an uncatchable compile error. The template had
been verified by rendering it with plain Jinja defaults, which do not match the
ones Ansible uses - the check confirmed the escaping and missed the line above.
A one-character fix (`{% macro`) is correct and was verified end to end, but the
commit is reverted rather than repaired, because its premise did not survive
review:
- The failure it targeted is not deterministic. The same task ran 13 times
across the swarm jobs of run 30830377785 and passed 12 times, including a
second fedora job on the same commit and topology. It is an ~8% flake.
- It does not remove the mechanism. 03_upgrade.yml:8 runs
`occ maintenance:repair --include-expensive` unconditionally, and upstream
Repair.php sets the maintenance system value twice with no guard - two
exclusive locks on the same NFS config.php per deploy, unretried.
- The benefit is largely illusory. Config.php:279 var_exports the whole merged
cache back into config.php, so the nine values land in the locked file anyway
on the first maintenance:repair, with a larger payload.
- It traded away occ's exit-code confirmation that Nextcloud accepted the
values, and moved them from the shared NFS volume to a node-local bind.
The remaining exposure is the unretried occ calls in 03_upgrade.yml; a bounded
retry there is the smaller and better-targeted change and is left for its own
commit.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
5940d3049f |
fix(swarm-drill): keep the floor handoff out of the INFINITO namespace
bdb3b29a9 passed the watchdog floor to the drill as INFINITO_DISK_FLOOR_MB and
broke test-lint:
AssertionError: INFINITO_* keys referenced in code without a registry entry
INFINITO_DISK_FLOOR_MB
The prefix is reserved for the deployment env registry, where every key needs a
default in default.env or a handler that sets it. This value is neither: it is a
handoff from matrix.py to the script matrix.py starts, and it only exists for
the duration of that call. DRILL_EXTRAS, one line above, already goes the same
way under an unprefixed name.
So the key becomes DISK_FLOOR_MB and its declaration moves up beside
DRILL_EXTRAS in the `: "${VAR:?...}"` form the file uses for matrix handoffs,
leaving the INFINITO_* block below to the values that really come from .env.
Registering it in default.env would have satisfied the lint by writing 6144 down
a second time, which is the duplication bdb3b29a9 set out to remove; a nocheck
would have hidden the naming mistake rather than fixed it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
9ad1a1a8a4 |
fix(swarm-drill): read the node name via uname
hostname(1) is not installed in every node image. In run 30830377785 the arch
drill printed
trigger_units.sh: line 22: hostname: command not found
starting svc-bkp-local-2-device.11.6.0.infinito.nexus.service on
so the node name came out empty on all three call sites. The cosmetic one is the
progress line; the damaging one is the journal dump path, which becomes
"${unit}..journal.txt" and is identical on every node. Four hosts writing the
same filename into the shared dumps directory means the artifact keeps whichever
one wrote last, and a unit failure gets investigated against another host's
journal.
uname is coreutils and present wherever the drill runs. Reading it once also
drops three subshells from the loop.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
32b0d3df94 |
fix(swarm-drill): account for the watchdog floor in the space precondition
The drill's space check required FREE >= PULLED, but the run is killed from outside by matrix.py's watchdog as soon as the runner drops below 6G free. The check knew nothing about that floor, so it waved through a drill that could not finish: 19008M free against a 13961M pulled tree passes FREE >= PULLED, and the sync then leaves 5047M, which is under the floor. That is what happened to the arch swarm drill in run 30830377785. The device sync reported the marker at 19:16:38.34, the watchdog fired at 19:16:39.73 on its next 30s tick, and the step died with rc 75 thirteen minutes into work that was already doomed when the precondition ran. The requirement is PULLED + FLOOR, not FREE >= PULLED and not 2 * PULLED. FREE is measured after the pull, so the first copy is already deducted; exactly one further copy is ever added on top of it - the device copy during the sync, and later the restore root, by which time base.sh has deleted the pulled tree. The two extra copies are sequential, never simultaneous. matrix.py owns the floor now and exports it as INFINITO_DISK_FLOOR_MB. It was previously a bare `6 * 2**30` the shell had no way to see, which is why the two sides could disagree about what "enough disk" means. This makes the failure honest and immediate; it does not create disk. The arch runner is short by about 1.1G, and closing that needs a capacity decision - bigger runner, smaller test dataset, or reclaiming build cache before the drill. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
04dfb98800 |
style(networks): apply the formatter to the split-out modules
Leftovers from extracting lookup_context and attachments: the mock.patch target got short enough to fit on one line again, and the file split left a spare blank line in each module. Whitespace only, produced by autoformat during make quality, so the 298 tests of that run already covered this state. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
e3068a37d8 |
fix(nextcloud): render system config instead of setting it via occ
Nine sequential `occ config:system:set` calls each open config.php exclusively.
In swarm that file lives on the NFS share behind every replica, and the seventh
call could not take the lock:
In Config.php line 306:
Could not acquire an exclusive lock on the config file
/var/www/html/config/config.php
stdout shows six values written before the abort, so the run left a partial
configuration behind. That failed the swarm web-app-nextcloud 5 job in run
30830377785 while every PLAY RECAP on the other nodes reported failed=0.
The same nine values now come from templates/config/system.config.php.j2, which
rides the additional-config channel the role already uses for redis, ldap and
the rest: rendered to NEXTCLOUD_HOST_CONF_ADD_PATH, mounted read-only, merged by
zzz-infinito.config.php after config.php so its values win. That path never
takes an exclusive lock, and it runs before the stack starts, since all nine
values are statically derived and none needs a live container.
Two behaviours are deliberately not carried over. The --type flags become native
PHP types, which is stricter than the string coercion occ applied. And nothing
confirms the file was accepted any more, where occ's exit code did; a read-only
`config:system:get` would restore that assurance at the cost of an occ call, and
is left out until someone wants it.
php_str() escapes backslashes and single quotes, matching the idiom already used
for the redis password in memcache.config.php.j2. Without it a quote in any
value would be a PHP syntax error, and include_once would drop every additional
config file, not just this one.
vars/system.yml and 02_manager_ops/05_system_config.yml are gone; the later task
files shift down one number so test_task_file_numbering stays satisfied.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
8df0ad4f5d |
fix(compose): derive the network label from the renderer
Two places decided independently what the pre-created <entity> network is called inside the compose project. render.py emits the key; create.yml asserted it was always `default`. They diverged in July and nobody noticed, because compose 5.3.1 resolved networks by name and never read the claim. Compose 5.4.0, published 2026-08-03T14:39:12Z, resolves them by label. For web-app-seaweedfs - the one deployed role that provides its own shared_net and therefore renders an unnamed `default` - the mislabelled `seaweedfs` network is adopted as the project default, `seaweedfs_default` is never created, and the containers fail to start against it. That failed web-app-nextcloud 0 and 3 in run 30830377785. _shared_network_key() is now the single derivation. render_compose_networks takes its branch from it, so the rendering decision IS the key decision; shared_network_compose_key() exports the same value, the shared_network_key lookup hands it to Ansible, and create.yml stamps it: `seaweedfs` for a self-provider, `default` for everyone else. Both true, both from the source that renders the file. Verified on one host with only the compose binary swapped: 5.4.0 network=default -> FAIL, network <project>_default not found 5.4.0 network=<entity> -> OK 5.3.1 network=default -> OK 5.3.1 network=<entity> -> OK so this is not a fix that trades one version for the other. test_key_matches_the_key_the_renderer_emits renders the block and asserts the reported key appears in it, for both role shapes and both modes. The drift that sat unnoticed for a month now breaks a test. The move of the attachment computation into utils/networks/attachments.py rides along because render.py would otherwise be broken between two commits: it is a pure relocation, re-exported so no importer changes, and it brings the file from 352 to 243 lines. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
f3b478b79c |
refactor(networks): assemble the lookup context in one place
compose_networks, container_networks and compose_external_networks each rebuilt the same Ansible-side context before calling their renderer: resolve the variables, settle the deployment mode, load applications, build the service registry, and close over the config and database lookups. Around forty lines, three times, each with its own copy of _resolve_var. A change to how the registry or the closures are obtained could reach one lookup and miss another. build_context() returns that context once. honour_mode_force carries the only real difference between the callers: compose_external_networks never consulted compose_mode_force, and still does not. The lookups keep only what is theirs - term validation, their own arguments, their renderer call - and drop from 94/90/87 lines to 59/54/53. No assertion changed in the tests; only the mock targets moved with the seam, from the plugin modules to utils.networks.lookup_context. Twelve legacy comments in those test files lost their grandfathering when the files entered the lint's diff scope: two became docstrings naming the call contract, the rest were narration and are gone. Behaviour-preserving: the same 13 lookup tests pass before and after. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
3ea77004c2 |
style(lint): reflow the async gate assertion message
autoformat joined the two operands of the message concatenation during make quality; 1408c6770 had them on separate lines. Formatting only, same expression and same output. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
25372b24fa |
fix(mariadb): do not read a missing container as a wrong root password
The login probe concludes "login failed, so the password is wrong" and hands over to 02_reset_root_password.yml, which stops the container, scales the swarm service to 0, boots a recovery server with --skip-grant-tables, rewrites the root password and scales back. That is a full teardown of the central database, so what triggers it has to be right. container exec also fails when the container is not on this node. The probe delegates to STACK_HOST, and resolve_container_id.sh tries a local lookup first but otherwise falls back to `container service ps` + `container inspect --type=task`, which returns the container id of a task on ANY node and exits 0. On a manager that does not host the task, container exec then answers "No such container". Two amplifiers turn that into a silent misdiagnosis: failed_when: false, and - verified by execution, since the opposite was claimed - retry exhaustion under until: does NOT abort a task carrying failed_when: false. The task stays ok, `failed: True` only appears in the result, and the gate fires. The clause excludes exactly that case. mariadb never prints "No such container" for a bad password, so no legitimate trigger is lost, and the exec failure stays as visible as it was. Not reachable today: the swarm topology has one manager and svc-db-mariadb declares placement: manager, so the local branch of the resolver always matches. It becomes reachable with two or more managers, which the comment on that placement line names as planned. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
afff6b3787 |
fix(swarm): bake the zfs userland into the apt node image
docker_dataroot.sh installs zfsutils-linux at runtime, so the zfs pick depends on the package cache being up. In run 30781723102 that decided the two swarm drills differently: the cache stack was removed at 06:39:49 and rebuilt at 07:18:25, so the mariadb drill had no zfsutils candidate at all and declined, while the postgres drill got one and reached zpool create. Installing it at build time removes that dependency. Debian keeps zfsutils-linux in contrib, which the base image does not enable, so the branch adds a contrib source first - only for ID=debian, since Ubuntu ships it in its default components. A failed update after adding the source removes the source again rather than leaving a broken repo line behind. The install is deliberately separate from the mandatory packages and non-fatal. Node images for centos, fedora and arch have no zfs userland either and resolve.sh's userland_for() already accounts for that, so a missing zfs userland is a supported state - whereas folding it into the mandatory install would let a packaging error break the node image for all five distros. A failure now prints to stderr and the run declines the pick visibly. Verified against the real bookworm contrib index (deb.debian.org, HTTP 200): zfsutils-linux 2.1.11-1+deb12u1 exists there, all four libzfs libraries are Depends rather than Recommends so --no-install-recommends keeps them, and the only Recommends are zfs-modules|zfs-dkms and zfs-zed, which we do not want - the module comes from the host via /lib/modules. Control flow exercised with a stubbed apt-get across six combinations of distro, package availability and update failure; every one leaves the build at rc 0. Not covered here: whether a 2.1 userland can drive the runner's newer host module. zfs-version.txt and modules.txt from 264556a31 answer that next run. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
b7c28e5b5c |
feat(ci): warn when a job applied the requested filesystem nowhere
A job whose nodes all declined the filesystem tested none of it, and the table row saying so reads like an ordinary result. That is how the debian arm lost its zfs coverage without anyone noticing: docker_dataroot.sh exists to exercise the snapshot mode of svc-bkp-volume-2-local, which engages only on btrfs and zfs, and on that arm it has been engaging on neither. The summary now carries an explicit warning when no node applied the requested filesystem and at least one declined it. Partial coverage is coverage and stays unflagged; a job with no verdicts at all still exits early. Deliberately a finding, not a failure. Stating a filesystem instead of `auto` would set REQUIRED=true in resolve.sh and turn a decline into a hard error, but that would paint the debian arm red for a cause that is understood and not yet fixed - the node image has no zfsutils candidate without the package cache. The goal was never to enforce the pick, only to stop losing it silently. Exercised against three real job logs from run 30781723102: the debian arm (5 nodes, all declined) produces the warning; the ubuntu arm (10 nodes, zfs applied) and an ext4 job do not. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
bbb35c7bce |
fix(openresty): dump the debug logs from a manager
The MODE_DEBUG block of the restart handler carries no host gate, unlike its two siblings in the same file which are pinned to a deployment mode and, in swarm, to IS_STACK_HOST. A handler runs on the host that notified it, and a worker reaches this notify: sys-stk-front-proxy/tasks/main.yml:112-118 is an always-changed `command: true` whose only guard is `not nginx_conf.changed`, and the stack-host template action forces changed:False on workers, so the guard is always satisfied there. On a worker the container_address subshell then exits 64 - resolve-container-id refuses to run off a manager - the substitution collapses to empty, `container logs --tail=200` fails, and failed_when:false plus ignore_errors:true swallow it. The debug task below prints an empty string, so the diagnostic reports "no logs" on exactly the node someone enabled MODE_DEBUG to inspect. container_address returns a string to embed, not a delegation; it decides what is addressed, not from where. delegate_to supplies the second half. STACK_HOST rather than the resolve_host_cid include, because svc-prx-openresty declares placement: manager (meta/services.yml:9), so the task can only run on a manager and the full host resolution buys nothing. In compose STACK_HOST is inventory_hostname, so this is a no-op there. The sibling `container ps -a` stays undelegated: a per-node container listing is legitimately node-local. Diagnostics only - nothing gates on openresty_logs, and MODE_DEBUG defaults to false. Not executed: no swarm worker run reproduces the empty dump. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
ee12b412e0 |
refactor(nextcloud): resolve OpenProject before waiting on its endpoint
Both waits are needed and check different things: wait_converged inside resolve_host_cid asks swarm whether the task reached running, the wait_for asks whether the service answers. Running the endpoint wait first meant a partner that is not deployed at all paid both budgets in sequence - up to 600s of HTTP timeout followed by 120x5s of convergence - before the play gave up. Ordering the cheap service-level check first halves that without giving up either guarantee. The resolver needs no HTTP: it runs container service ps, container ps and set_fact, and its two outputs are first consumed by the rails call further down, i.e. after both waits. Task order only; nothing added, removed or reparameterised. 8b2cbcb04 applies the same ordering to the Zammad twin, where the wait was newly introduced. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
ee62f76a5d |
fix(nextcloud): wait for the Zammad endpoint before provisioning
resolve_host_cid's convergence wait is swarm-only (wait_converged.yml:9), so in
compose mode nothing made sure Zammad answers before the rails provisioning ran
- the only budget there was the provisioning task's own 12x10s against a rails
server whose cold start can exceed it. integration_openproject_provision.yml
already guards its partner this way; this restores the symmetry.
The wait sits after the resolver rather than before it. Both waits are needed
and check different things - wait_converged asks swarm whether the task reached
running, the wait_for asks whether the service answers - but ordering the cheap
service-level check first means a partner that is not deployed at all fails
after one budget instead of two. The resolver itself needs no HTTP: it only runs
container service ps / container ps and set_fact.
Not executed: that lookup('domain', 'web-app-zammad') resolves to a name
answering on port 80 is taken from the openproject twin, not measured.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
cdf5db4c1f |
feat(diagnostics): collect module, device and network counters
Two investigations of run 30781723102 stalled on files the rescue capture does not take. The zfs question - why the debian lab nodes cannot use a module their ubuntu counterparts apply on ten nodes - needed /proc/modules to see whether the module is loaded, /proc/misc to see whether it registered (a misc device never appears in /proc/devices, which is what docker_dataroot.sh was searching), `ls -l /dev/zfs` to tell a real node from the static one every privileged container inherits, and `zfs version` for the libzfs version a whole refuted hypothesis turned on. The matrix-mdad question - whether ~31.8s per git clone is a connect stall or a server-side queue - needs the TCP retransmission counters in /proc/net/snmp and /proc/net/netstat and the conntrack drop counters. Neither can be distinguished from per-clone timings alone. Executed on a host with no zfs: a missing binary and a missing proc file each land as text in the artifact rather than aborting the capture, which is the best-effort contract run() already implements. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
40173e8266 |
test(lint): compare the async/poll gate, not the word omit
The rule checked whether both keys contain the token `omit`. That catches the Ollama shape, where async carried no omit at all, but it does not enforce what the failure message claims: two keys can both carry omit and still hang on different switches, and the old check passed that. _gate() now reads the switch each key states inline - the test of an `if ... else omit`, or the left side of a `| ternary(..., omit)` - and the two must match. A key that names no gate matches another that names none, which is the shape sys-service and the canonical ASYNC_TIME/ASYNC_POLL pair use; both then inherit whatever their variables do. An unrecognised omit-bearing form falls into a single bucket, so it only matches another unrecognised form. Checked against all five shapes in the tree: the pre-fix Ollama pair is an offender, the fixed pair and the ternary and bare-variable pairs are not, and two different conditions are now an offender where the token check passed them. The rule still does not catch two ungated keys whose variables diverge. That is deliberate: group_vars makes ASYNC_TIME evaluate to omit while ASYNC_POLL stays numeric, and a poll without async is ignored. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
3f5d22b1ae |
fix(swarm): mask modprobe@.service in the lab node image
18abce480 added kmod so the data-root setup can run its one explicit `modprobe zfs`. It also handed a working loader to the four modprobe@ instances systemd pulls at every node boot - configfs, drm, efi_pstore and fuse - which until now failed on the missing binary, as every node's journal in rescue-diagnostics-workspace-debian-bookworm shows. They would have started loading host modules from a privileged container, on every node of every swarm job in all five distros. Masking the template keeps them exactly as dead as they are today and leaves the loader available to the caller that needs it, so the behaviour change of 18abce480 is confined to the one site it was meant for. It sits with the existing masks for systemd-resolved and systemd-udevd. The image was not built; that the mask covers every instance of the template is read from systemd's behaviour, not measured. The next run shows it: the units report masked instead of failed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
41732fbf9a |
fix(drill): measure the device instead of budgeting a sparse nominal size
The guard compared free space against USB_SIZE_MB = PULLED_MB*2+256, which is the nominal size of an image 02_luks_device.sh creates with truncate - sparse, so nothing ever allocates it. It also ran after that script, i.e. once the image was already created, formatted and mounted, so the image's own footprint was already subtracted from the df it read. It charged the pulled tree a second time while that tree was counted as used, not free. In run 30781723102 it demanded 28108M against 16582M and refused a drill that fits: the peak is 14555M additional, derived from rescue-diagnostics-swarm-web-app-nextcloud-0, and the same run's debian job contains a full 9/9 completion of the same drill. Rather than predicting the image's ext4 overhead - two earlier attempts at that constant were wrong in both directions - both thresholds are now read: df on DEV_MOUNT reports what the encrypted filesystem actually offers after mkfs, and df on DIR_BACKUPS reports what the host still has for the copy the sync writes into the sparse file and, later, the restore root. Both are compared against PULLED_MB, a measured quantity. USB_SIZE_MB keeps sizing the image. Every abort now tears the device down (umount, luksClose, rm -f); a refused drill previously left the mapping and the image behind. Exercised against the recorded numbers and six edge cases: 26624/16582/13926 passes where the old guard refused, an undersized device or host is refused, and an empty or non-numeric df reading is reported as unreadable. Both thresholds sit exactly at PULLED_MB, so second-order allocation inside the image (extent trees, directory blocks) is uncovered - tens of MiB against a 13.9 GiB tree. The drill has not been run with this guard. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
ee6fb584bc |
fix(swarm): install kmod in the lab node image
The node image ships no module loader, so `modprobe zfs` in scripts/tests/deploy/utils/filesystem/docker_dataroot.sh was a no-op whose error was additionally discarded by `2>/dev/null || true`. Every node's own systemd says so at boot, in rescue-diagnostics-workspace-debian-bookworm of run 30781723102: (modprobe)[27]: modprobe@configfs.service: Unable to locate executable '/sbin/modprobe': No such file or directory The module itself is reachable: the nodes run privileged with /lib/modules bind-mounted read-only, and their df confirms it. What was missing is the loader, not the module. zfs-load-module.service is installed and enabled in the image and sits inactive for the same reason. This does not by itself make the debian lane apply zfs. `The ZFS modules are not loaded.` in job 91588086713 came from libzfs at `zpool create`, not from the suppressed modprobe - the kernel ring buffer shows five 30 GiB loop attachments at 07:37:32, i.e. the script was past the /dev/zfs gate. And a Debian bookworm node only has a zfsutils-linux candidate while the package cache stack is up: the cache was removed at 06:39:49 and rebuilt at 07:18:25, which is why the mariadb drill declined at the userland check while the postgres drill reached zpool create. That cache dependency is untouched here. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
b19d1d18a0 |
style(nextcloud): drop a nocheck marker the resolver rule never reads
The marker claimed to suppress container-exec-resolver, but that rule does not fire on this task. Its extractor reads the first argument after `container exec` and finds `-i`, so it returns no target; the container id is four lines further down. The position was wrong too: the rule accepts a marker on the same or the immediately preceding non-empty line, and three lines separated the two. That leaves a suppression marker carrying a rationale, which is the shape the comment policy exists to prevent. The reason it stated - that container_address would expand to a manager-only subshell - is already in 04b8cfead's message. tests/lint/ansible/shell/container/ stays green without it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
98396dcfbb |
fix(ci): bring docker back up on every exit after the data-root stop
The script stops the daemon at :157-158 and starts it again only on the success path at :220. decline() exits 0 and set -e exits non-zero, and both walk past that start, so any other outcome leaves the host without docker. One of the three callers is test-deploy-host.yml:171, where the script runs on the GitHub runner itself rather than in a lab node container. An EXIT trap rather than a restart inside decline(), because decline is not the only affected exit: arm_autoclear's exit 1 and every set -e abort at mkdir, truncate, zfs create, mkfs, mount, btrfs subvolume create and the daemon.json writer sit in the same window. The trap is armed only after the stop, and DOCKER_STOPPED=false after a successful start makes it a no-op on the green path. A failed restart is reported rather than swallowed, so it cannot hide the failure that led there. This hazard predates 02dc003bb: the loop-device decline added in the commit before it has the same property. 02dc003bb widened it by putting a second decline behind the stop. Verified with a stubbed-PATH harness driving the real script: after a failed zpool create the call log contains `systemctl start docker`, and it comes after `losetup -d`, so the teardown still precedes the restart. REQUIRED=true still exits 1, the success path is unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
539c71a5b7 |
perf(matrix): skip the galaxy install when requirements.yml is unchanged
bootstrap.sh re-cloned all 31 unauthenticated GitHub repos on every bootstrap, including warm re-runs where roles/galaxy was already fully populated. The install is now keyed on the sha256 of requirements.yml: the stamp is removed before the install and written only after it, `--force` stays inside the branch so a changed requirements.yml still refreshes every role, and set -euo pipefail still aborts on a galaxy failure. Nothing is masked and no retry is added. The stamp lives in roles/galaxy/, not in the matrix_mdad_state volume, so it shares one lifecycle with the roles it describes. The volume-vs-bind-mount split is the same cross-domain state coupling that 5d6d1c7ca blames for this run's matrix failure, where the bootstrap gate read its marker from a volume and the synapse unit from the container rootfs. This is not a fix for the HTTP 503 that failed web-app-nextcloud 3 in run 30781723102: that job ran a cold container, which always clones. It removes re-clones on redeploys of a persistent host. The 503's mechanism is still open - the observed ~31.8s per clone is flat and payload-independent, and neither runner bandwidth nor host load explains it. PYTHONUNBUFFERED=1 line-buffers ansible's stdout in the unit. Without it every progress line carries one flush timestamp at process exit, which is why the 667s of the failing install cannot be split into per-clone times. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |