Skip to content

[OpenRC] Proposed changes - To Defer - #63

Open
cyidatweaksonly-dot wants to merge 2 commits into
stagingfrom
prerelease-1.1.4-wrench
Open

[OpenRC] Proposed changes - To Defer#63
cyidatweaksonly-dot wants to merge 2 commits into
stagingfrom
prerelease-1.1.4-wrench

Conversation

@cyidatweaksonly-dot

@cyidatweaksonly-dot cyidatweaksonly-dot commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

See my message on IRC for more information. Do not merge yet at this time.

agentpone added 2 commits June 16, 2026 17:22
… crash recovery

Add supervised OpenRC babysitter units (lunarwing-pg-<t>-ctr,
lunarwing-nanocode-<t>-ctr, lunarwing-pebble-<t>-ctr) that block on
'podman wait' under supervise-daemon, reducing crash recovery latency
from ~30 min (self-heal sweep) to ~5s.

Key design decisions:
- Two-unit model: existing imperative unit keeps health-aware status();
  new -ctr babysitter handles liveness supervision only. Clean separation.
- Wrapper script (ic/scripts/lunarwing-ctr-babysit) invoked via clean
  positional args in command_args — avoids the OpenRC whitespace-split
  argv bug that would silently break 'sh -c "..."' patterns.
- start_pre() guards bail if runtime/uid/wrapper are missing — prevents
  infinite crash-loops from exec failures.
- Stop ordering: babysitter stopped BEFORE imperative unit, eliminating
  the race where supervise-daemon respawns a container we just stopped.
- -ctr units filtered from health-openrc.sh discovery (S7) and
  self-heal's unit_tenant() resolution (D-ctr).

Lifecycle wiring:
- _register_worker_unit: renders + starts boot-persistent -ctr unit
- _deregister_worker_unit: stops + removes -ctr unit (babysitter first)
- start/stop/uninstall_tenant_openrc: full OpenRC lifecycle

Tests: 247/0 (regression 28 + matrix 128 + chaos 36 + openrc 24
+ babysit 31). The babysit suite generates real unit files from the
renderers, simulates OpenRC argv-splitting, and includes 4 regression
grep guards that catch reintroduction of the broken 'sh -c' pattern.

See /opt/data/notes/podman-babysitter-review-pass-2026-06-16.md
for the full audit.
Full correctness audit of the OpenRC container babysitter changes,
including the critical command_args quoting bug found during review
and all subsequent fixes applied in the same session.
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8553a81d-cd53-40bb-b947-f0c1d09a9c6a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

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