|

Runtime zygctl single/multi leave services unstartable (gated) #6

Closed Chris Tusa opened this issue 59 days ago
Chris Tusa opened this issue 59 days ago

Former local file: bugs/017-runtime-runlevel-transition-leaves-nothing-running.md.

Status

Gated, not fixed. zygctl single / zygctl multi (and init <N> via sysv-wrapper) refuse with an error instead of half-transitioning. The underlying defect remains: mark_runlevel_filtered puts a service in STATE_INACTIVE, and Phase A of start_services_by_tier only starts STATE_WAITING. A service stopped by a runtime transition never returns to a startable state.

Recovery: boot -s (works) or reboot into the desired runlevel.

Hardware

Measured on hh-alpha9, zyginit 0.4.0: runtime zygctl single left 0 services running (was 14), no recovery shell; zygctl multi recovered nothing. mode = always oneshots are not stopped by the transition (earlier report of that was withdrawn).

Blocker for a real fix

Decide what a runlevel-filtered dependency means if X requires Y and Y is not in this runlevel: (a) satisfied like SKIPPED, (b) filter X too, (c) fail X (today). Wrong choice recreates a dependency cascade on PID 1. See ROADMAP.md (Near Term — runtime runlevel transitions).

Chris Tusa commented 23 days ago

Landed option (b) transitive filter + mechanical restore. Tip 392:b38cb14d9ded (on 0.6.3 tree; refuse gate dropped).

Diff / behavior

  • transition_runlevel Pass 1: out-of-set WAITING → INACTIVE; transition-stopped daemons → INACTIVE; successful oneshots (STOPPED exit=0) stay STOPPED
  • Before Pass 2: in-set INACTIVE → WAITING (revive_runlevel_filtered)
  • Transitive filter (b): unmet INACTIVE / out-of-runlevel dep → dependent marked INACTIVE (not FAILED); running dependents stopped then filtered
  • Skip completed oneshots in the TF mark pass (hh-beta02 network requires dlmgmtd — re-filtering caused exit=2 cascade)
  • Production zygctl single/multi refuse dropped after Linux round-trip greens

Tests

  • Linux integration: 292 passed / 0 failed (includes multi→single→multi restore + (b) + oneshot preserve)

hh-beta02 prove (live binary md5 dc470df430332490b0635fc79f671372)

Artifacts /var/tmp/zyginit6-prove3/:

  • single: single-user-shell running; multi daemons inactive; network stayed stopped exit=0; no FAILED cascade
  • multi: single-user-shell inactive; sshd/syslogd/cron/console-login/vtdaemon/… running; network still stopped exit=0; FAILCOUNT=0

Follow-ups (not in this close)

  • #7 / #8 stay open
  • Version still 0.6.3 in-tree — cut 0.6.4 + update-zyginit pin / bake when ready (live replace used for prove)

Assignees

No assignees

Labels

No labels

Severity

High