Skip to content

fix: wait liveness probes through the PID-1 reaper - #14

Merged
keskad merged 2 commits into
mainfrom
fix/liveness-reaper-race
Aug 26, 2026
Merged

fix: wait liveness probes through the PID-1 reaper#14
keskad merged 2 commits into
mainfrom
fix/liveness-reaper-race

Conversation

@keskad

@keskad keskad commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Cmd liveness probes (micronet check) raced the PID-1 waitpid(-1) reaper and failed with ECHILD (No child process (os error 10)).
  • Short-lived shell children now wait on the central exit registry when the reaper is running; unit tests without a reaper keep Child::wait.
  • New livenessProbe.failureThreshold (default 1) so a single failed probe does not restart a service.

Confirmed on the hub: microinit describe network showed liveness_failed (... No child process (os error 10)) every ~96s, which ran micronet teardown and dropped the LAN.

Test plan

  • cargo test / cargo clippy --all-targets -- -D warnings
  • After merge + image: microinit describe network stays at 0 restarts; long ping 192.168.0.5 stays up

Made with Cursor

keskad and others added 2 commits August 26, 2026 20:05
Cmd probes used Child::try_wait while waitpid(-1) already reaped the
child, so micronet check failed with ECHILD and recycled network.

Wait on the exit registry when the reaper is running, and add
livenessProbe.failureThreshold so a single failed probe does not restart.

Co-authored-by: Cursor <cursoragent@cursor.com>
cmd_timeout already covers run_shell_quiet_timeout expiry; the 200ms
sleep check returned a code on CI instead of None.

Co-authored-by: Cursor <cursoragent@cursor.com>
@keskad
keskad merged commit 9786edb into main Aug 26, 2026
6 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