Device add on IDIP: the agent's netbird up is a no-op on a device already on another mesh and records the foreign address as the mesh fact; a member Files placement writes a kanidm-only files-idp.nix onto the gateway and nothing detaches it — gatew… #2040
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#2040
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two defects found together on the Whakatōhea Demo (IDIP community, release
7373b279) while adding the full-install deviceDelilah, 2026-10-03. They compound: the first makes a device look joined when it is not; the second breaks the gateway's config the moment that device is set up.A. The agent's mesh join is a silent no-op on a device already connected to another netbird management — and it reports the OTHER mesh's address as the community mesh fact
Symptom: the install terminal printed
✓ joined the community networkand the request reached Enrolled, but the gateway's community mesh (self-hostednetbird-managementon the gateway, 100.83.0.0/16) never gained a peer. The ledger recordedmesh_address = 100.98.84.207— the device's address on the Mātou mesh (netbird.matou.nz), where it had been logged in since an earlier abandoned attempt. Every deploy then dialledroot@100.98.84.207from the gateway and timed out: Set up (seed step,learn node-req-0005's host key at its mesh door (#1075) … Connection timed out), the Services door, AND the auto-update lane's rollout (update: seed node-req-0005: … could not reach the node) every 5 minutes.Cause:
agent/internal/meshup/meshup.gorunsnetbird up --setup-key K --management-url M, then reads the address back fromnetbird status --json. netbird'supreturns early with "Already connected" when the daemon is already connected — to ANY management — so no login happened, the single-use key was never redeemed, and the status read returned the Mātou wt0. The adapter cannot tell "joined" from "was already somewhere else". The device's/var/log/netbird/client.loghas no login at the landing minute; the gateway's peer list had only Tahi's guest.Fix (proposed): before
up, readnetbird status --json; ifmanagementState.URLis set and differs fromadm.Management(or the daemon is connected anywhere else), either runnetbird downand thenup(the device consented to join THIS community; its prior mesh is not ours to keep), or fail loud naming the conflict (ADR 0100) — never proceed. Afterup, assert the status's management URL equalsadm.Managementand the address lies inside the management's range before recording it; a mismatch is a fault, not a mesh fact. Seam test: a fake runner whose status reports another management URL → the join is refused or re-logged, never reported with the foreign address.B. A member-device Files placement writes a kanidm-side OAuth2 client onto the gateway, unconditionally — on an IDIP community that breaks the gateway's eval, and nothing ever detaches it
Symptom: after Delilah's first Set up (recommended set: second copies of archive, data-collections, document-archive, files, surveys + backup copies), every gateway deploy failed at preflight:
including the Remove-device deploy, so the phantom node could not even be removed through the product.
Cause:
attachMemberFilesPlacement(internal/provision/deploy.go) always callsclan.AttachFilesIDP, which writesmachines/gateway/files-idp.nix(ADR 0210 ruling 3: the Nextcloud OAuth2 client provisioned "beside kanidm") andComposeGatewayCohostimports it. The render readsconfig.clan.core.vars.generators.kanidm-admins— a generator only a kanidm community has. There is no IDIP branch (compare the bridge branches #1919–#1924 added for whakapapa/video/code/meetings) and noDetachFilesIDP: removing the device detached every module from the node (detach … from node-req-0005commits) but leftfiles-idp.nixon the gateway. Config repo commit9648a83 idss: attach files-idp (OAuth2 client) on gatewayat 23:33:43Z is the moment the gateway broke.Fix (proposed): (1)
attachMemberFilesPlacementon an IDIP community (o.bridgeIDP) must NOT write the kanidm client — either render the bridge equivalent for a member-placed Files, or gatefilesout of member placement on IDIP in the assessment (gated:true, "second copy of Files is gateway-only on this community for now") the same way #2039 asks for Newsletters. (2) Add the detach: removing Files from the last member device (and Remove-device) deletesfiles-idp.nixand recomposes the gateway. (3) Seam test: an IDIP fleet + member Files placement → the gateway machine dir contains nofiles-idp.nix, and the composed gateway evaluates (theTestOwnVPSGateway_*eval-smoke family).Hand recovery performed on the demo (so the box state is known)
git rm machines/gateway/files-idp.nix+ dropped its import frommachines/gateway/configuration.nix, committed ascontrol-plane <control-plane@idss>with the control plane stopped (8667c32); verified bynix eval …gateway…toplevel.drvPathin a scratch copy first (14 s, clean).POST /api/v1/provision/devices/node-req-0005/remove→ green (40afc8e idss: remove node node-req-0005); fleet back to gateway + Tahi.netbird downBEFORE approval, approve →req-0006Enrolled withmesh_address 100.83.245.38; the gateway's mesh showswhakatohea.netbird.meshconnected andssh root@100.83.245.38answers. Delilah must be set up WITHOUT Files & documents until B lands, or the gateway breaks again.Acceptance
mesh_addressis inside the community range and the gateway lists it as a peer) or the landing fails loud with the conflict named; the terminal never prints✓ joined the community networkon a no-opup.files-idp.nixbehind on a kanidm community either.Related
#2038, #2039 (same device, same day), #1075, #1068, #1114, #1927, ADR 0209, ADR 0210 ruling 3, ADR 0214, ADR 0100,
agent/internal/meshup/meshup.go,internal/provision/deploy.go(attachMemberFilesPlacement),internal/clan/files_idp_gateway.go.swarm-claim host=bens-mac-04 run=38316
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #2040 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope