Repository navigation
fix(daemon): serving the main ports refuses a stack of containers only - #188
Merged
Merged
Conversation
`take_main` moves the fixed ports of `[services.*]` and their workers. A Compose container's published port is Docker's, so for a stack of containers only it moved nothing, set the owner anyway and answered `200`. It now refuses with `409` and says why; the dashboard shows it. The docs say what the main ports are. Part 1 of #184; moving the containers' ports needs an ADR first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 21, 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.
Part 1 of #184. This does not close the issue, because part 2 needs an ADR first.
Problem
For a stack with Compose containers only,
POST /v1/lanes/{lane}/main("serve main ports") answered200and recorded the lane as the main-slot owner, but nothing moved.take_mainmoves only the fixed ports of[services.*]and their workers. A container's published port is bound by Docker.Fix
moves_main_slot(stack)insupervisor/handover.rschecks whether the stack has anything the slot can move: a service with a port that runs in lanes on this platform (not a job), or one with workers.take_mainrefuses with409when there is nothing to move: "this stack has no services on main ports: Compose containers keep their own ports, so the main slot cannot move them". The dashboard'sactshows the message. Giving the slot back (main) is unaffected.docs/stack-file.md,docs/dashboard-api.mdanddocs/pool.mdnow say the main ports are the services' fixed ports. CHANGELOG is updated.Tests
handover.rs: a stack with no services, or only one withlanes = false, moves nothing; a service on a port, or one with workers, moves.cargo clippy -p devstack-daemon --all-targets -- -D warningsandcargo fmtpass.🤖 Generated with Claude Code