Skip to content

Read the whole journal when waiting for startup - #410

Merged
demegire merged 1 commit into
mainfrom
fix/startup-check-sigpipe
Oct 13, 2026
Merged

demegire merged 1 commit into
mainfrom
fix/startup-check-sigpipe

Conversation

@demegire

Copy link
Copy Markdown
Contributor

The first automatic production deploy (run 38403758909) switched prod to 748aee1, which reported Application startup complete at 13:22:50, a minute after starting. The job still failed with "did not report startup in time".

activate_release.sh waited with journalctl … | grep -q … under set -o pipefail. grep -q exits on the first match, journalctl gets SIGPIPE, and pipefail turns the found line into a failure. Staging's journal was short enough to be written before grep exited, so it passed there. The check now counts matches with grep -c, which reads the whole journal.

Verification

  • Against prod's real journal (read-only), for that restart: the old expression says not found, the new one finds 1 match.
  • Deployed this branch to staging with its own infra/deploy.sh (exit 0, startup reported, health OK).

Tested on staging

This changes the deploy scripts, which deploy-staging can't test because it always runs main's scripts. I deployed it to staging with the branch's deploy.sh instead and set the staging status by hand. docs/staging.md now describes that path.

Notes

Prod is healthy on 748aee1 (NRestarts 0, /healthz 200). Merging this deploys it to staging and prod, which also checks the corrected wait on prod.

🤖 Generated with Claude Code

grep -q stops at the first match, journalctl then gets SIGPIPE, and pipefail turned a
found startup line into a failure. Production's first automatic deploy started in a
minute and was still reported as not starting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@demegire
demegire requested a review from a team as a code owner October 13, 2026 13:32
@demegire
demegire merged commit b81b621 into main Oct 13, 2026
8 checks passed
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