Repository navigation
fix: keep Linux remotes out of the device pool and offer them in build suggestions - #3653
Merged
janicduplessis merged 2 commits intoOct 13, 2026
Conversation
janicduplessis
added this pull request to stack #3619
October 13, 2026 06:55
janicduplessis
force-pushed
the
feat/3649-linux-pool-and-suggestions
branch
3 times, most recently
from
October 13, 2026 07:21
de3f45b to
1d2a905
Compare
This was referenced Oct 13, 2026
janicduplessis
marked this pull request as ready for review
October 13, 2026 16:50
github-merge-queue
Bot
removed this pull request from the merge queue because a pull request earlier in the stack was removed
Oct 13, 2026
janicduplessis
force-pushed
the
feat/3649-linux-pool-and-suggestions
branch
from
October 13, 2026 17:58
1d2a905 to
5790e2f
Compare
github-merge-queue
Bot
removed this pull request from the merge queue because a pull request earlier in the stack was removed
Oct 13, 2026
janicduplessis
force-pushed
the
feat/3649-linux-pool-and-suggestions
branch
from
October 13, 2026 19:11
5790e2f to
6126da1
Compare
janicduplessis
force-pushed
the
feat/3649-linux-pool-and-suggestions
branch
from
October 13, 2026 20:29
6126da1 to
bbee4d3
Compare
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.
Description
Depends on #3647 (stack: #3610 -> #3618 -> #3621 -> #3631 -> #3638 -> #3639 -> #3647 -> this).
A Linux remote could count as a device-pool member it can never satisfy.
validateAutomaticPool('device', …)accepts any configured remote with an approved device-host credential, andhostingMachines()hands every asked machine to automatic placement. A Linux machine can hold such a credential: a Linux stim-server accepts device-host requests, andstim-server devices grant <id> --device-hosthas no platform check (onlysetuprefuses--device-hostthere). Before #3639,stim doctor --fixalso asked Linux machines for device-host access. Sostim settings set remote.devicePoolDisabled '["local"]', or turning off Simulators enabled for This Machine in Desktop, succeeded while the only remaining member could never host. Every--remote autorun then refused, and the Linux row no longer shows its Simulators toggle (#3647).Desktop's build suggestions ignored Linux peers.
DiscoveryCoordinatorread only online macOS peers, so the new-peer and build-slot-wait suggestions never offered a Linux machine, although the wizard can add one.Solution
CLI. Core's
cannotHost(status, entry)says whethertailscale statusreports the peer as running an OS other than macOS; an unknown OS (no status, peer missing, noOS) counts as able to host. It is applied in three places:validateAutomaticPooltakes acanHostpredicate for the device role, andwriteConfigSettingpasses it. It readstailscale statusbefore taking the config lock, and only when the write leaves local out of the device pool, the one case where validation looks at remotes.hostingMachines(), used by automatic and planned placement, drops those machines, so they are never probed or chosen.inspectDeviceHostMachinesuses the same helper and now applies it even to a saved approval. Such a machine is neither contacted nor reported as approved: it showsnot-askedwith no finding, and the credential stays on disk. Desktop therefore never sees an approved Linux host, so its device-limit "Use Auto" prompt and its Simulators pill cannot name one.The build pool is unchanged. I did not make the Linux server refuse device-host requests or grants: an existing approval on any server version would still need the client-side check, which this PR adds.
Desktop.
DiscoveryCoordinatorreadsTailnet.buildPeers(online Macs and Linux machines). The new-peer suggestion uses all of them; the build-slot suggestion preselects a Linux machine only when an Android build waited, since an iOS build cannot go there.Discovery.capHitnow takes the peers and preselects only a Mac, so the device-limit suggestion stays Mac-only. With only a Linux peer it says "another Mac" and preselects nothing. The seen-peers baseline moves to a new defaults key (discovery.seenBuildPeers): the old one held only Macs, so reusing it would announce every long-present Linux node as having just joined. The first poll after the upgrade records a fresh baseline without prompting.Test plan
settings-command.test.ts:boxthattailscale statusreports aslinux,stim settings set remote.devicePoolDisabled '["local"]'exits 1 and writes nothing.macOSis accepted.tailscaleis stubbed through the executor.device-host-machines.test.ts:hostingMachinesdrops a peer reported aslinuxand keeps it when the status is unknown.linux.realIo.status, so no test runs the realtailscalebinary.DiscoveryTests: the device-limit suggestion skips a Linux peer and picks the Mac when both are online; the build-slot suggestion picks the Linux peer after an Android wait and the Mac after an iOS wait.stim macos;stim logs --errorswas empty. The screen was still locked, so there are no new window screenshots; the suggestion banners are unchanged visually.Fixes #3649