Repository navigation
fix: ports held on 0.0.0.0 on Windows, one pool reporter per machine, containers apart in status (#226, #170, #184) - #234
Merged
Conversation
On Windows a bind on 127.0.0.1 succeeds while a process of the same user listens on 0.0.0.0 (a dev server started with `--host 0.0.0.0`, Docker Desktop's published ports), so `port_in_use` took such a port to be free: the start checks, the port ranges of lanes, the forwarded ports of lanes on nodes and `devstack doctor`. - `devstack_proc::tcp_listening(port)` reads the system's tables of TCP listeners (`GetExtendedTcpTable`, IPv4 and IPv6) and says whether one listens on the port on the wildcard address or on loopback. About 0.3 ms per call for both tables (debug build), so range scans stay cheap. Nothing listens on the wildcard to ask (no firewall prompt), and there is no connect probe (seconds per closed loopback port). - `port_in_use` asks it on Windows after the binds; Linux and macOS are unchanged. - `a_port_held_on_every_address_is_in_use` runs on Windows too. Closes #226 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a machine where the hub and `devstack node agent` run for the same pool, both reported as the same member every 15 s, and the coordinator keeps only the last report. The hub's carries no API and no leases: after each, placement took the machine for one without an agent, and its leases were dropped, to come back with the agent's next report with a new `created`, a new token and without their sharing (ADR-0035). - The node agent holds `node/lock` in its membership's folder while it runs (`StateLock`); it waits a few seconds for one held by the agent it replaces, and refuses a second agent of the same member. - The hub's share loop does not report for a pool while that lock is held; the agent reports the machine then, total and GPUs included. `GET /hub/pool/share` says so (`agent`). - `StateLock::held` asks with a shared lock for a moment and creates nothing. - A test with a coordinator, the hub's round and an agent of the same member: across the hub's rounds the node keeps its API and a running, shared lease its `created` and its sharing; once the agent stops, the hub reports again. Closes #170 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…column `devstack status` printed its `SERVICE` header for every stack and the Compose groups below it, so a stack of containers only showed them under `SERVICE`, while a service in the stack file and in "main ports" is a `[services.*]` entry only. - The service table shows when the stack has services (or nothing else). - The containers follow in a table of their own, `CONTAINER`, `STATE`, `PORTS`, by group (`compose.<group> (<project>)`), as `devstack top` lists them apart already. - The devstack skill says which is which. Closes #184 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Three fixes, one commit each.
Windows: a port another process holds on 0.0.0.0 counts as in use (#226)
On Windows a bind on
127.0.0.1succeeds while a process of the same user listens on0.0.0.0, soport_in_usetook such a port to be free.devstack_proc::tcp_listening(port)now reads the system's TCP listener tables (GetExtendedTcpTable,TCP_TABLE_OWNER_PID_LISTENER, IPv4 and IPv6) and treats a listener on the wildcard address or on loopback as taken. Nothing listens on the wildcard (no firewall prompt), and there is no connect probe. One read of both tables costs about 0.3 to 0.6 ms (about 150 listeners on the machine), so range scans inlanes.rsstay cheap.a_port_held_on_every_address_is_in_usenow runs on Windows too.Closes #226
Hub and node agent on one machine no longer report over each other (#170)
The node agent holds
node/lockin its membership's folder while it runs. If that lock is still held when it starts (the agent it replaces, or a hub checking it), it retries for 10 s. A second agent of the same member is refused. The hub's share loop does not report for a pool while the lock is held, andGET /hub/pool/sharesays so (agent). The new testshare::tests::the_hub_does_not_report_over_a_node_agent_of_the_same_memberuses a coordinator, the hub's round and an agent of the same member. Across the hub's rounds, the node keeps its API, and a running, shared lease keeps itscreatedand its sharing. Once the agent stops, the hub reports again. Without the fix, the test fails on "the API stays".Closes #170
devstack status: Compose containers get their own table (#184, part 3)The
SERVICEtable is printed only for a stack that has[services.*]entries (or has nothing else). Containers are listed in a table of their own,CONTAINER/STATE/PORTS, by group. The devstack skill now says which table is which.Closes #184
🤖 Generated with Claude Code