Repository navigation
chore: main into next (run record for the life of its engine) - #356
Merged
Merged
Conversation
A berthd that restarted while a pinned or training engine was alive could grant a second whole-card lease. The runner wrote its record only after it noticed the lost socket, so a run that was stopped, or slow to read EOF, left the new daemon nothing to see, and it granted at once. #354 has the reproducer. The record now covers the whole life of the engine. It is written when the child starts, rewritten with the reason when the daemon goes away, cleared when the run re-attaches, and removed when the child exits. berthd counts every live record it has no lease for as due back, so the card stays held until the run re-attaches or the window closes. A training still holds with no timer, and a keep-up record holds nothing because that drain freed the card on purpose. The new tests failed before the change: TestLiveRunHoldsTheCardUntilItReattaches, TestRecordForALeasedRunHoldsNothing, the two-record table in TestTrainingLocksTheCardUntilItReattaches, and the reattach e2e, which now asserts the record before the daemon stops and its cleared state after the re-attach. One interval remains: a daemon that dies between the grant and the child start. No process exists there for a runner record to describe, so closing it needs a durable grant record in berthd.
fix(runner): record a run for the life of its engine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merges #355 into
next.berth runandberth trainrecord their engine for the whole run, so a restarted daemon cannot grant a second whole-card lease onto a live engine (v0.6.1: restart grants a second whole-card lease before a live pinned/training runner observes EOF #354).## [Unreleased], beside A run booking that can claim its hours: drain the holder at the start, with consent given when booking #345's Added entry.