Repository navigation
Replies: 3 comments
|
Verified all three code claims on current main, and the proposal is sound. Do this: Confirmed in source. On your three questions:
One test to demand of the PR: reboot-simulation with a stopped kernel (teardown-marked) asserting no resurrection — rule 3 is the load-bearing behavior and the easiest to regress. Confirm the above by reading |
|
Thanks, @haralez, for the report from your Linux host: after an orderly reboot under a service manager, the kernel stayed down until it was restored by hand, and its status said We'd welcome the PR you offered, kept focused and with regression tests. For your three questions, please have it take a position on each and give its reasons; the review will decide. The tests should keep today's behavior where it's intended: a kernel someone stopped with |
|
PR: #1081. It takes a position, with reasons, on each of the three open questions. Detached-versus-exited is the signal, tightened to require each seat to still be bound to its session, because unclaiming a seat also marks it detached. Status reuses the existing seat aggregation. The fix is daemon-side, with no new setting. Its regression tests include a kernel stopped with |
Uh oh!
There was an error while loading. Please reload this page.
What I'm trying to do, and what stops me
After a host reboot I want
rig start(or the daemon coming back under a service manager) to bring back the kernel: the operator, advisor and queue worker. Today it never does:bootKernelIfNeededreturnsskipped("kernel rig already managed") whenever a rig namedkernelexists (kernelAlreadyManagedonly checks the name). After a reboot the rig exists, but none of its seats are running.rig startdoesn't restore it either. It treatsskippedas fine and leaveskernelout of its restore candidates (if (rig.name === "kernel") continue;instart.ts)./api/kernel/statusandrig statusreportskippedwhether the kernel is up or gone, because the tracker never looks at liveness in that state.So the kernel only comes back if someone knows to run
rig up kernel --existingby hand. #1060 makesrig startsay so. This proposal is about not needing it.Evidence
On one Linux host running OpenRig 0.6.6, after an orderly reboot:
rig up kernel --existing. We now run that from a separate boot step, beforerig start --last, as a workaround.GET /api/kernel/statusreturnskernel_state: "skipped"anddetail: "kernel rig already managed". That's the same answer as when it's down.kernelAlreadyManaged, the tracker'sskippedstate, and thekernelexclusion inrig start.The fact that makes this safe
The daemon can already tell a lost kernel from a stopped one, and it knows which before kernel boot runs:
rig down(rig-teardown.ts) marks the rig's sessionsexited.runningin the database. Startup reconciliation, which runs beforebootKernelIfNeeded, finds no tmux session and marks themdetached(reconciler.ts).Proposed behaviour
In
bootKernelIfNeeded, when akernelrig exists:runningsession after reconciliation): skip as today, but report it truthfully, asready,partial_readyorbootingderived from the seats (the tracker already does this aggregation after a cold boot).detached(lost, not stopped): restore it the wayrig up kernel --existingdoes, fired and not awaited like the cold boot, and tracked asbootingthroughready,partial_readyorbootstrap_failed.exited(someone ranrig down kernel): stayskipped, with a detail that says the kernel is stopped and how to start it.OPENRIG_NO_KERNEL=1and test mode: unchanged, never restore.Why it stays safe
rig down kernelsticky across daemon restarts, so this never resurrects a kernel someone stopped.rig up kernel --existing, rather than cold-booting a new kernel over the old rig.rig startorrig up. Restoring all rigs on daemon start is a separate question and not part of this.Cost to everyone else
/api/kernel/statusgives more truthful values in the already-managed case (readyand so on, instead of alwaysskipped). Anything that treatsskippedas "kernel fine" keeps working, because it will seereadyinstead.Open questions for maintainers
detached" the right lost-versus-stopped signal, or is there a better rig-level marker?rig startinclude the kernel as a restore candidate (CLI-side) than have the daemon do it? The daemon side covers service-manager restarts where nobody runsrig start.I'm happy to send a PR for whichever shape you prefer.
All reactions