Repository navigation
fix(node): remove the Compose projects of a lane whose slot is gone (#394) - #395
Merged
Merged
Conversation
…394) A slot directory removed without its purge (one without `slot.json` at the agent's start, or by an agent of an earlier release) left the lane's Compose projects and its groups' fixed-name networks running for good. On a shared host that used up Docker's address pools, and no lane could get a network. Every purge round (ten minutes) the agent now removes the projects of its lanes whose slot no lease holds, has no directory and is not being purged, found by name (`<project>-<slot>`) and by where Compose ran them (under its slots, so another pool's agent keeps its own); their volumes stay. A lane whose network cannot be made because the pools are used up says so, and docs/pool.md says how to give Docker more. Closes #394 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.
Closes #394.
slot.jsonat the agent's start, or by an agent of an earlier release) left the lane's Compose projects and its groups' fixed-name networks running for good. On a node that shares its host, this used up Docker's address pools: 28 containers and 6 networks of two lanes ran for 10 days with no lease.sweep_orphan_projectsruns every purge round (10 min). It removes the Compose projects of this agent's lanes whose slot has no lease, no directory and no purge under way.<project>-<slot>, viaslot_of_project, which also catches the<project>-search-<slot>kind) and bycom.docker.compose.project.working_dirlying under this agent's slots. Another pool's agent on the same engine keeps its own (ADR-0034).devstack.lane=1networks go after its projects. Right before each removal the slot is checked again, in case a lane of it starts right then.default-address-pools.docs/pool.md(Run a node) coversdefault-address-poolsand what the agent cleans up. Changelog updated.No review card: a bug fix within ADR-0038's rules (a stopped lane's data is kept, its containers are not).
Tests
a_gone_lanes_projects_are_found_by_slot_and_placechecks four cases: a gone slot's two projects are found once each; a held slot's project is kept; a project under another root is kept; a project that is not a lane's is kept.cargo test -p devstack-node --lib: 105 passed.cargo clippy -p devstack-node --all-targets -D warningsandcargo fmtare clean.🤖 Generated with Claude Code