Runtime zygctl single/multi leave services unstartable (gated) #6
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).
Landed option (b) transitive filter + mechanical restore. Tip 392:b38cb14d9ded (on 0.6.3 tree; refuse gate dropped).
Diff / behavior
transition_runlevelPass 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
networkrequiresdlmgmtd— re-filtering caused exit=2 cascade) - Production
zygctl single/multirefuse 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-shellrunning; multi daemonsinactive;networkstayedstopped exit=0; no FAILED cascade - multi:
single-user-shellinactive; sshd/syslogd/cron/console-login/vtdaemon/… running;networkstillstopped exit=0; FAILCOUNT=0
Follow-ups (not in this close)
Assignees
No assignees
Labels
No labels
Severity
High