Repository navigation
fix(node, daemon): a lane on a node outlives a short absence of its requester (#379) - #380
Merged
Merged
Conversation
…equester (#379) A lease lived two minutes without renewals, so a reboot or sleep of the requester's machine lost every lane it had on nodes. A lease now lives a grace: an hour on a dedicated node, 15 minutes on another, or the node policy's `lease_grace_minutes`. The daemon gives a lane up only after the grace the node grants, and one starting after an unclean end follows its lanes again while their leases run instead of releasing them. Amends ADR-0026 point 5 and ADR-0052 point 6.
#379) The lane's lease outlives the daemon's crash by the node's grace now, so the next daemon follows the lane again instead of saying it is gone; the test stops it afterwards to leave the node clear for the steps that follow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
Fixes #379.
A node ended a lease 120 s after its last renewal, the client gave a lane up after 150 s without one, and a daemon starting after an unclean end released any lease it found in a lane's
followed.json. So a reboot or sleep of the requester's machine lost every lane it had on nodes, along with the work running in them.Review card (ADR-0070)
Approved by the owner in the conversation on 2026-10-30: points 1–4, with the defaults as proposed.
lease_grace_minuteschanges it, and the strictest policy wins.adopt), and releases the lease only if renewing fails. Amends ADR-0052 point 6.expiresin the renew answer) has run out, not after a fixed 150 s.docs/pool.mdsays so.Decided on my own:
--detachedmode: it would only be an unlimited grace.followed.jsonnote doesn't record the lane's profile or workers, so a re-attached lane doesn't get the main slot back.keep_lanes_*.Changes
devstack-node:lease_grace_minutesinNodePolicy(strictesttakes the smaller), andNode::grace()used inadmitandrenewinstead ofTTL.devstack-daemon:follow_renewwaits as long as the node's grace, with 150 s as the minimum (nodes before this release).Lanes::unfollowedgoes throughtake_up_remote, the same path a restart uses.docs/pool.md, amendment notes in ADR-0026 and ADR-0052, the ADR index, CHANGELOG.Tests
cargo clippy --workspace --all-targets -D warningsis clean.cargo test -p devstack-nodeandcargo test -p devstack-daemonpass.a_lane_is_leased_admitted_and_syncednow asserts that a dedicated node grants about an hour.