fix: bug: edge container supervisor loop never runs (and /opt/disinto-logs not created) (#555) #580

Merged
dev-bot merged 1 commit from fix/issue-555 into main 2026-04-10 10:07:39 +00:00
Collaborator

Fixes #555

Changes

Fixes #555 ## Changes
dev-bot added 1 commit 2026-04-10 09:33:01 +00:00
fix: bug: edge container supervisor loop never runs (and /opt/disinto-logs not created) (#555)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
098c19cb3a
Two fixes:
- Create /opt/disinto-logs before supervisor loop starts (tee was failing)
- Replace exec caddy with background caddy + wait -n pattern so the
  supervisor loop subshell isn't orphaned when the parent shell exec's away

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Collaborator

AI Review — Error\n\nReview failed.\n---\n098c19c

## AI Review — Error\n<!-- review-error: 098c19cb3a58b43bbea4ce10c84bca6488a4f8ed -->\nReview failed.\n---\n*098c19c*
Collaborator

AI Review

Summary\n\nFixes two independent bugs in the edge container entrypoint:\n\n1. Missing log directory — was not created before tried to write to it.\n2. Supervisor loop orphaned by exec — replaced the shell (PID 1) with caddy, which doesn't reap children. The backgrounded supervisor loop was still running but caddy as PID 1 accumulated zombie children and provided no watchdog behaviour on either service.\n\n### Assessment\n\nThe fix is correct and uses a standard Docker multi-service pattern:\n\n- — straightforward fix for bug #1.\n- — explicit subshell; functionally equivalent to in bash but clearer intent.\n- instead of — keeps the shell alive as PID 1, so it can properly wait for and reap children.\n- — blocks until any child exits (caddy crash or supervisor crash), then exits with code 1 to trigger a restart. This is the correct watchdog pattern.\n\n** availability**: requires bash 4.3+. The script uses and the edge image installs bash explicitly, so this is fine.\n\nexit 1 on clean shutdown: intentional — the edge container is always expected to be restarted on any service exit. No issue.\n\nNo security issues, no dead code, no external-action violations. Change is minimal and targeted.

Verdict

APPROVE — Both bugs correctly fixed: log directory created before tee, and exec replaced with background+wait-n to keep the shell as PID 1 so background jobs survive and zombies are reaped.


Reviewed at 098c19c | AGENTS.md

## AI Review <!-- reviewed: 098c19cb3a58b43bbea4ce10c84bca6488a4f8ed --> ### Summary\n\nFixes two independent bugs in the edge container entrypoint:\n\n1. **Missing log directory** — was not created before tried to write to it.\n2. **Supervisor loop orphaned by exec** — replaced the shell (PID 1) with caddy, which doesn't reap children. The backgrounded supervisor loop was still running but caddy as PID 1 accumulated zombie children and provided no watchdog behaviour on either service.\n\n### Assessment\n\nThe fix is correct and uses a standard Docker multi-service pattern:\n\n- — straightforward fix for bug #1.\n- — explicit subshell; functionally equivalent to in bash but clearer intent.\n- instead of — keeps the shell alive as PID 1, so it can properly wait for and reap children.\n- — blocks until any child exits (caddy crash or supervisor crash), then exits with code 1 to trigger a restart. This is the correct watchdog pattern.\n\n** availability**: requires bash 4.3+. The script uses and the edge image installs bash explicitly, so this is fine.\n\n**exit 1 on clean shutdown**: intentional — the edge container is always expected to be restarted on any service exit. No issue.\n\nNo security issues, no dead code, no external-action violations. Change is minimal and targeted. ### Verdict **APPROVE** — Both bugs correctly fixed: log directory created before tee, and exec replaced with background+wait-n to keep the shell as PID 1 so background jobs survive and zombies are reaped. --- *Reviewed at `098c19c` | [AGENTS.md](AGENTS.md)*
review-bot approved these changes 2026-04-10 10:07:27 +00:00
review-bot left a comment
Collaborator

AI Review: APPROVE — Both bugs correctly fixed: log directory created before tee, and exec replaced with background+wait-n to keep the shell as PID 1 so background jobs survive and zombies are reaped.

AI Review: **APPROVE** — Both bugs correctly fixed: log directory created before tee, and exec replaced with background+wait-n to keep the shell as PID 1 so background jobs survive and zombies are reaped.
dev-bot merged commit afeaffbeae into main 2026-04-10 10:07:39 +00:00
dev-bot deleted branch fix/issue-555 2026-04-10 10:07:39 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: disinto-admin/disinto#580
No description provided.