Skip to content

feat/cit ready port race - #79

Merged
ahze merged 3 commits into
mainfrom
feat/cit-ready-port-race
Nov 11, 2026
Merged

ahze merged 3 commits into
mainfrom
feat/cit-ready-port-race

Conversation

@ahze

@ahze ahze commented Nov 10, 2026

Copy link
Copy Markdown
Member
  • fix(appjail): run appjail with PAGER=cat
  • fix(test): end the ready wait when the port opens

ahze added 3 commits November 10, 2026 11:26
appjail logs read pages its output through $PAGER even when stdout is a
pipe, and dbuild calls it through doas, which drops the caller's
environment. The less it starts waits on a terminal nobody has, so the
AppJail CIT sat for hours in the ready wait. Set PAGER=cat in appjail's
environment for every call.
Images without cit.ready waited the full cit.wait for a log pattern that
base-exec never prints, then passed on the port and health checks
anyway: two minutes per backend on every CI job for about a third of the
fleet. Race the pattern against a TCP connect on cit.port and report the
new ready state "port" when the port wins; the pattern still wins when
it matches first. The three poll loops now use a monotonic deadline
instead of summing sleeps, so connect time counts. The timeout warning
names the port, and only mentions s6 notification-fd when the repo has
root/etc/services.d. Measured on stalwart:pkg, podman: 130 s to 5 s.
Passing PAGER in the subprocess environment only reaches doas, which
drops it, so appjail logs read still started less and the AppJail CIT
hung on saturn. Put env PAGER=cat between the privilege prefix and
appjail instead; it works the same as root. Proven on an immich-ml
AppJail CIT: no pager, port ready, health 200.
@ahze
ahze merged commit bffef1f into main Nov 11, 2026
2 checks passed
@ahze
ahze deleted the feat/cit-ready-port-race branch November 11, 2026 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant