Repository navigation
fix(pool): a node ends the lease of a lane whose container is gone (#565) - #567
Merged
Merged
Conversation
) A node ended a lease only when its requester released it, an admin ended it or its grace ran out. A lane container stopped by hand (or exited, or removed) kept its lease, and with it the lane's slot and share of the node, for the whole grace: the lane's `status` and `up` failed on its daemon, and a requester that had lost the lease got `409 ... runs here already`. A warm lease whose daemon ended held its capacity as long. Each round the node now looks at which lane containers run: a started lease whose container did not run in this round and the one before ends as an expired one (`why=gone`); a start under way or failed, a lease not started yet and a Docker that does not answer end nothing. A warm lease lives at most 3 minutes without a renewal. The requester's daemon names the stopped container among the reasons a lease is over. Bug-Class: stale-state Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 18, 2026
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.
What and why
A node ended a lease only when its requester released it, an admin ended it or its grace ran out (an hour on a dedicated node). Two leases held the lane's slot and the node's capacity longer than anything used them (#565, follow-up to #563):
statusandupfailed on its daemon (the lane's daemon: failed to lookup address information), and a requester that had lost the lease got409 ... runs here already (lease <id>)until the grace ran out.prepareran: it held its capacity for the grace.Changes:
background, every 15 s) the node looks at which lane containers run (docker ps --filter label=devstack.lease --filter status=running). A started lease whose container did not run in this round and the one before ends as an expired one, withwhy=goneinnode_lease_ended. A start under way or failed (starting), a lease not started yet (nostack_file) and a Docker that does not answer end nothing.lease_grace_minutesstill wins.devstack upstarts the lane again.docs/pool.md,CHANGELOG.md.No review card: node housekeeping and a timeout, decided with the owner at the start (2026-11-18).
Verification
stale-statedocker stop:status502,upfailed on the lane's daemon, also after a restart of the requester's daemon; the lease stayed. The two new unit tests failed at their assertions before the fix.remote_lane_ended,upstarted the lane at once; a running lane stayed over several rounds. The node runs its released agent again.a_started_lease_whose_lane_container_is_gone_ends_in_the_second_round,a_warm_lease_lives_a_few_minutes_without_a_renewal. Integration (remote_lane.rs, Linux CI job "lane on a node"): the lane container stopped, the lease ends,upruns it again.Closes #565
🤖 Generated with Claude Code