The files deploy's FIRST activation reds at switch-to-configuration status 4: logrotate-checkconf and nextcloud-cron both fail during the activation that introduces nginx/Nextcloud #1020
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Reference
Matou/idss#1020
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Failure
Drive
20260830T065451Zred atdeploy-files(sig 03a7ed69caec), 15/16 legs green. The co-host deploy of the files service converged — Nextcloud installed, nginx up, user_oidc configured — butswitch-to-configurationexited status 4, so clan reported the node failed and the deploy surfaced a fault frame.GOTCHAS #126 already records the governing rule:
switch-to-configurationexitsstatus 4when a unit it started failed. Two stock units fail on the FIRST activation that introduces nginx/Nextcloud, and both are pure races that pass seconds later.Evidence
All cites are
test-results/drive-idip/20260830T065451Z/logs/droplet-journal.txt.1.
logrotate-checkconf.serviceraces nginx's own log directory.:155007:06:14 Starting Nginx Web Server...:157907:06:14 logrotate[9802]: error: stat of /var/log/nginx/*.log failed: Permission denied(logrotate had just dropped to euid 60; the glob never expanded):1582/:1584logrotate-checkconf.service: Main process exited, code=exited, status=1/FAILURE→Failed with result 'exit-code':161407:06:14 Started Nginx Web Server.— nginx finished starting AFTER the check had already read its log dir:1910on the immediate re-switch 25 s later the identical check finds/var/log/nginx/access.loganderror.logandFinished Logrotate configuration check2.
nextcloud-cron.servicefires beforenextcloud-setup.servicehas ever run.:152707:06:13 Started nextcloud-cron.timer.:159807:06:14 Started nextcloud-cron.service.:1635nextcloud-cron.service: Failed with result 'exit-code'—php[9841]: Exception: Not installed in .../lib/base.php:226:165307:06:16 Starting nextcloud-setup.service...,:173007:06:28 Finished nextcloud-setup.service.— the install completes fourteen seconds after cron already failed on its absence3. The switch dies on the sum of them.
:183007:06:37 nixos[9599]: switching to system configuration /nix/store/q3ndwb10...-nixos-system-gateway... failed (status 4):1831/:1832clan-switch-gateway-15be7037.service: Main process exited, code=exited, status=4/NOPERMISSION→Failed with result 'exit-code':195407:06:42 idss-control-plane WARN msg="provision deploy failed" device=gateway error="provision: deploy gateway: clan: deploy failed on 1 node(s): gateway"logs/droplet-units.txtconfirms the box itself is fine:systemctl --failednames nothing, nginx isactive (running)since 07:06:14 and phpfpm-nextcloud since 07:06:29.Suspected layer
The rendered NixOS config for the files service —
internal/clan/files.go. That file is already the established home for exactly this kind of activation-ordering patch:internal/clan/files.go:482emitssystemd.services.nextcloud-setup.after = [ "postgresql.service" ];for the same class of first-activation race. Neitherlogrotatenornextcloud-cronis mentioned anywhere in the repo today (grep -rn logrotateover all.go/.nix/.ts/.mdreturns nothing), so both units arrive purely as NixOS stock behaviour that our render never constrains.What plugging it needs
On the files render, make the first activation unit-clean:
/var/log/nginxexists and is readable by the nginx uid beforelogrotate-checkconfruns (asystemd.tmpfiles.rulesentry), or orderlogrotate-checkconfafternginx.service, or setservices.logrotate.checkConfig = falsewhen we provision nginx. Prefer whichever keeps the check's value on later generations rather than deleting it outright.nextcloud-setup.service, or give it aConditionPathExistson the installed config so a pre-install boot tick is skipped rather than failed.Both are render-string changes with teeth available as
internal/clan/files_test.gorender assertions (go test ./internal/clan/), matching thenextcloud-setup.afterprecedent.Also worth checking while in here (an observation, not a required change): clan re-switched by itself immediately after the failure —
clan-switch-gateway-841ae130.serviceran07:06:37→07:06:41and completed cleanly (:1927finished switching to system configuration,:1928Deactivated successfully) — yet the control plane still recorded the deploy as failed one second later (:1954). Worth confirming whether clan's own successful re-switch is meant to clear the node's failure, or whether the aggregate is correctly reporting the first pass. This is secondary; fixing the two units removes the trigger either way.Add a GOTCHAS entry with the fix (
docs/GOTCHAS.md, sibling to #126, which already states thestatus 4rule this hazard is a fresh instance of).drive
20260830T065451Zred atdeploy-files:deploy failed (clean-retry): provision: deploy gateway: clan: deploy failed on 1 node(s): gatewayevidence:
/home/dev/swarm/Matou/idss/test-results/drive-idip/20260830T065451Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedswarm-claim host=elitebook-distributed-server-03 run=14369
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #1020 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope