Repository navigation
feat(pool): a pool grows by nodes a provisioner makes (ADR-0051) - #335
Merged
Merged
Conversation
A lane the pool places that no node can take makes a machine through the pool's provisioner (an HTTP service that holds the provider's credentials), for a member an admin allowed and within the pool's caps. The start waits for it as a phase of its own; the machine enrols once with a single-use token from the address the provisioner named, a second use or one from elsewhere revokes it and alarms the admins. Optionally an admin confirms each machine, or a machine runs one repository's lanes. Placement fills provisioned nodes; idle ones are given back, deletions retried until confirmed, and the provisioner is told of machines and leases. A member can keep its lanes off them. - devstack-node: provision.rs (contract, settings, machines, a mock provisioner), the coordinator's fallback, wait, enrolment, tend and rank_filling, the store's flags, Local::enrol/lease_or_wait/wait - CLI: node serve --provisioner, node provisioning, node confirm, node give-back, node members provision, join --enrol, pool provisioned, the hidden node mock-provisioner - daemon: the provision phase of a start on a node - hub and dashboard: provisioned nodes, machines and alarms, confirm, give back, the member's own switch - devstack.exe gets an 8 MiB main stack on Windows (build.rs): the debug build's clap tree overflowed the default 1 MiB Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 27, 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.
Builds ADR-0051, accepted on its card #328, with a mock provisioner to test it.
What it does
--on pool) that no node can take makes a machine through the pool's provisioner (devstack node serve --provisioner <url>). Only for members an admin allowed (devstack node members provision <id> on), never for warm leases or named nodes, and within caps (devstack node provisioning --max-nodes/--max-cpus/--max-memory-gib). A machine already on its way that holds the lane is waited for instead of making another.provision, between 60 s and 10 min. The requester opts in withPOST /v1/leases?wait=provisionand pollsGET /v1/leases/{id}/wait. An older requester is refused as before.devstack join <coord> --fingerprint <fp> --enrol <token>. The token is single-use and accepted only from the IP the provisioner named. A second use, or one from another address, revokes the node, deletes the machine, and records an alarm for admins (machines list, dashboard, audit log when a node had enrolled).--confirm adminmakes each machine wait fordevstack node confirm(or the dashboard).--per repobinds a machine to its repository through the node's policy.--idle-minutes, default 30) is revoked and deleted. Deletions are retried until confirmed, and the machine stays listed with the error until then. Eventsnode_ready,lease_begun,lease_ended,node_returnedgo to the provisioner.devstack pool provisioned offkeeps a member's lanes off provisioned nodes. A lane on one says so when it starts.Mocks for testing
devstack_node::provision::mock::Mock: an in-process provisioner. It can refuse, fail deletions, name another address or require a token, and records requests, deletions and events.crates/devstack-node/tests/provision.rsuses it end to end: wait → enrol → offer → fill → events → idle → give back with a failed deletion retried, refusals and caps, alarm on a second use, alarm on a foreign address, admin confirmation with repo binding.devstack node mock-provisioner(hidden): the same mock as a process, to try it on one machine.--execruns a command per machine with the enrolment in its environment;--refuse,--fail-deletes,--addressand--tokencover the other cases. See pool.md.Decided by the agent
These are details within the approved card; the implementation follows from the points, but none was asked separately.
PROTOCOLbump. The offer keeps its shape, and waiting is opted into with?wait=provision.repos, sonode.rsis unchanged.DEVSTACK_PROVISIONER_TOKENorprovisioner.token); no mTLS towards the provisioner yet.crates/devstack/build.rsgivesdevstack.exean 8 MiB main stack on Windows. The debug build's clap tree overflowed the default 1 MiB after the new subcommands; release builds were not affected.Checks
cargo fmt --check,cargo clippy --workspace --all-targets(0 warnings) andcargo test --workspaceare green on Windows. Inui/,npm run typecheck,npm testandnpm run buildare green.🤖 Generated with Claude Code