Repository navigation
ci(docker): bound the Swarm smoke test and fix its hang: Studio over 127.0.0.1 (#306) - #308
Merged
Merged
Conversation
… fails #306: `Build edge` has been cancelled at 90 min on every run since 2026-11-23, inside `scripts/swarm-smoke.sh`. The cancelled job's log shows the step printed nothing (not even its first "✓") and ends with "Terminate orphan process: (curl)": the first wait loop's `curl -sf "$studio/api/health"` had no time limit and never returned, so Helm, Trivy, arm64 and the edge tag never ran. - Every curl is `--connect-timeout 5 --max-time 15`; every docker call runs under `timeout` (120 s; 30–60 s in cleanup); `docker stack deploy` shows its output and fails the run. - The wait loop prints progress every 30 s (replicas, health code) and fails with them. - `fail` prints services, the tasks and logs of both services (cloudhal and seaweedfs), the stack's containers, and a verbose bounded curl of /api/health over 127.0.0.1 and localhost. - docker.yml: `timeout-minutes` 15 on the Swarm step, 20 on Helm, 15 on Trivy. The root cause comes from this run's log; the fix follows in this PR. Refs #306 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
…app from inside Run 46186851063 (#308) narrowed #306: the stack reports replicas 2/2 from the first minute, but /api/health on the published port never answers (curl 000 after 15 s) for the whole wait. The wait loop's 90 tries of up to 18 s each outran the step's 15-minute timeout, so `fail` never printed its state. - The waits are wall-clock deadlines (240 s for the stack, 120 s for the site's 503) with short probes (connect 3 s, max 5 s), so `fail` always runs well inside the step's 20 minutes. - Progress lines show the published port over localhost and 127.0.0.1 and /api/health from inside a cloudhal container (node fetch, bypassing the routing mesh): a stuck app and a port that is not forwarded look different. - `fail` adds health inside each container, host listeners on the published ports, the ingress network, the docker/kernel/firewall versions and the NAT rules for the ports. Refs #306 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
…lhost (#306) Root cause, from run 46188727714's probes: the app answers /api/health inside its container (200) and on the published port over 127.0.0.1 (200), but over `localhost` never (000). curl's verbose output shows `localhost` resolving to ::1 first and "Established connection to localhost (::1 port 58787)", then no reply: the routing mesh publishes IPv4 only, a connection to [::1]:<port> is accepted on GitHub's runners and never answered, and since it connected, curl never falls back to IPv4. The script's Studio URL was `http://localhost:$port` (its site URL was already 127.0.0.1), so the first wait hung, unbounded until #308, from the runner image change on 2026-11-23. - scripts/swarm-smoke.sh: Studio at http://127.0.0.1:$port, with the reason; the progress line shows the published port and the in-container probe; the bounds and diagnostics stay. - docs/guides/self-host.md and deploy/swarm/README.md: on the node itself use 127.0.0.1, not localhost, with the same reason. Seen in the same log, not changed here: two instances starting together race on a migration ("0004_audit_actor_name failed: duplicate column name: actor_name"); reported separately. Closes #306 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #306.
Root cause
The diagnostics in run 46188727714 settle it:
/api/healthinside the cloudhal container127.0.0.1localhost000, every timecurl's verbose output for
localhostshows the mechanism:localhostresolves to::1first;Established connection to localhost (::1 port 58787);The routing mesh publishes IPv4 only. On GitHub's runners (since the image change around 2026-11-23), a connection to
[::1]:<port>is accepted and never answered, and because it connected, curl never falls back to IPv4. The script's Studio URL washttp://localhost:$port; its site URL was already127.0.0.1. So the first wait hung until the job's 90-minute timeout.Change
scripts/swarm-smoke.sh:http://127.0.0.1:$port, with the reason in a comment.curlis bounded (--connect-timeout,--max-time), and everydockercall runs undertimeout.failprints the services, the tasks and logs of both services, the containers, per-container health, host listeners, the ingress network, versions, NAT rules, and a verbosecurlover127.0.0.1andlocalhost..github/workflows/docker.yml:timeout-minutes20 on the Swarm step, 20 on Helm and 15 on Trivy.docs/guides/self-host.mdanddeploy/swarm/README.mdnow say: on the node itself, use127.0.0.1, notlocalhost, with the reason.Seen in the same log, not changed here
When the two instances start together, they race on a migration:
0004_audit_actor_name failed: duplicate column name: actor_name, logged as an uncaught exception on one instance, while the other applied it. That is an app issue in the self-host cluster's startup, reported separately.CI only; nothing ran on a local Docker engine.
🤖 Generated with Claude Code