provision: no service can deploy to a member device — AttachService writes the catalogue slug as a clan-core module name (backup-copy), clan-core has none, eval fails; the failed attach stays in the config repo #2018

Closed
opened 2026-09-30 04:28:28 +00:00 by ben · 2 comments
Owner

Symptom

Setting up a member VM device with Backup copy (Whakatōhea Demo, node-req-0002 = bens-mac-04 guest, 2026-09-30 04:22–04:26Z): config committed, closures seeded (~200 MB over the mesh), then deploy-services failed:

provision deploy failed device=node-req-0002 error="provision: seal node-req-0002's declared vars before the apply (ADR 0126, #1496): clan: config mutation "idss: seal declared vars for node-req-0002": …
Error on: $ clan select 'clanInternals.cliChecks'
  Reason: flake input 'clan-core' doesn't provide clan-module with name 'backup-copy'.

Cause

internal/clan/config.go:162 AttachService writes every member-device service into inventory.json as module: {name: <catalogue slug>, input: "clan-core"}, so here {name: "backup-copy", input: "clan-core"}. clan-core has no module by that name (its BorgBackup module is borgbackup), and the repo carries no IDSS module for backup-copy. Any catalogue slug that is not literally a clan-core module name fails the same way on a member device. The gateway's services avoid it because they go through gateway_attach.go's own composer, not this path.

No drive has reached this step live: ADR 0264 fire 8 redded at deploy-services on a clan.lol outage before evaluation. The provision seams use the clan fake, which accepts any module name.

Consequence to check first

The failed attach leaves the instance in the config repo (cd2fee6 idss: attach service backup-copy to node-req-0002 as helper). If the whole flake no longer evaluates, every later rollout of the community, gateway included, fails at eval until the instance is removed. Check on the demo.

Fix

  • A single slug → module mapping for member-device services. Each catalogue service that can run on a member names its real module (clan-core borgbackup with the right roles for backup-copy, or an IDSS-shipped module under input: "self"). A slug with no module is not offered for a member device (catalogue + P4 Assess), rather than failing at deploy.
  • AttachService refuses a service with no mapping before it commits. A failed deploy leaves no instance that breaks evaluation for the rest of the fleet (roll the commit back, or evaluate before commit).
  • A test that evaluates the real inventory (not the fake) for every member-offerable service, and a drive leg (device-vm-byo deploy-services) that reaches evaluation.

Joining bens-mac-04: #2002–#2007 (live), #2011, #2013, #2014, #2017 (updates blocked by an unprovisioned node).

## Symptom Setting up a member VM device with **Backup copy** (Whakatōhea Demo, `node-req-0002` = `bens-mac-04` guest, 2026-09-30 04:22–04:26Z): config committed, closures seeded (~200 MB over the mesh), then `deploy-services` **failed**: ``` provision deploy failed device=node-req-0002 error="provision: seal node-req-0002's declared vars before the apply (ADR 0126, #1496): clan: config mutation "idss: seal declared vars for node-req-0002": … Error on: $ clan select 'clanInternals.cliChecks' Reason: flake input 'clan-core' doesn't provide clan-module with name 'backup-copy'. ``` ## Cause `internal/clan/config.go:162` `AttachService` writes every member-device service into `inventory.json` as `module: {name: <catalogue slug>, input: "clan-core"}`, so here `{name: "backup-copy", input: "clan-core"}`. clan-core has no module by that name (its BorgBackup module is `borgbackup`), and the repo carries no IDSS module for `backup-copy`. Any catalogue slug that is not literally a clan-core module name fails the same way on a member device. The gateway's services avoid it because they go through `gateway_attach.go`'s own composer, not this path. No drive has reached this step live: ADR 0264 fire 8 redded at `deploy-services` on a clan.lol outage **before** evaluation. The provision seams use the clan fake, which accepts any module name. ## Consequence to check first The failed attach leaves the instance in the config repo (`cd2fee6 idss: attach service backup-copy to node-req-0002 as helper`). If the whole flake no longer evaluates, **every later rollout of the community, gateway included, fails at eval** until the instance is removed. Check on the demo. ## Fix - A single slug → module mapping for member-device services. Each catalogue service that can run on a member names its real module (clan-core `borgbackup` with the right roles for `backup-copy`, or an IDSS-shipped module under `input: "self"`). A slug with no module is not offered for a member device (catalogue + P4 Assess), rather than failing at deploy. - `AttachService` refuses a service with no mapping before it commits. A failed deploy leaves no instance that breaks evaluation for the rest of the fleet (roll the commit back, or evaluate before commit). - A test that evaluates the real inventory (not the fake) for every member-offerable service, and a drive leg (`device-vm-byo` `deploy-services`) that reaches evaluation. ## Related Joining `bens-mac-04`: #2002–#2007 (live), #2011, #2013, #2014, #2017 (updates blocked by an unprovisioned node).

swarm-claim host=bens-mac-04 run=36290
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=bens-mac-04 run=36290 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #2018 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 2018,
  "status": "success",
  "commits": [
    "47dd93aaba0af58199c64ce7624f2b7068411544"
  ],
  "changed_files": [
    "STATUS.md",
    "docs/GOTCHAS.md",
    "internal/clan/backupcopy.go",
    "internal/clan/backupcopy_test.go",
    "internal/clan/config.go",
    "internal/clan/deployedservices.go",
    "internal/clan/seedcommunity_eval_test.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/clan/ ./internal/provision/",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/fleetstate/... ./internal/backup/... ./internal/backupengine/... ./internal/monitor/... ./internal/rescue/... ./internal/founding/... ./internal/controlapi/...",
      "exit_code": 0
    },
    {
      "command": "IDSS_EVAL_SMOKE=1 go test ./internal/clan/ -run TestMemberDeviceBackupCopy_EvalSmoke",
      "exit_code": 0
    },
    {
      "command": "go build ./... && go vet ./internal/clan/... ./internal/provision/...",
      "exit_code": 0
    }
  ],
  "criteria": {
    "A slug -> module mapping for member-device services; a slug with no real module is not written as a phantom clan-core instance": "internal/clan/backupcopy.go (renderlessModuleServices maps the renderless backup-copy job to a marker module file, not a clan-core instance); internal/clan/config.go AttachService resolves the renderless branch before writing any instance",
    "AttachService no longer commits a phantom instance that breaks fleet-wide eval": "internal/clan/config.go AttachService renderless branch writes backup-copy.nix and NO inventory instance; proven by internal/clan/backupcopy_test.go TestAttachService_BackupCopyLandsAsRenderlessMarkerNeverAPhantomInstance (asserts len(inv.Instances)==0)",
    "A test evaluates the REAL inventory (not the fake) for the member-offerable renderless service": "internal/clan/seedcommunity_eval_test.go TestMemberDeviceBackupCopy_EvalSmoke evals clanInternals.inventoryClass.inventorySerialization against real clan-core (d098fa2) with Backup copy placed and asserts an empty instances set — ran green under IDSS_EVAL_SMOKE=1",
    "A failed/placed backup-copy leaves no instance breaking evaluation for the rest of the fleet": "no instance is ever written for a renderless service; DetachService removes the marker (backup_copy_test.go TestDetachService_BackupCopyRemovesTheMarker); the eval smoke proves the community serializes clean with it placed"
  },
  "summary": "The renderless backup-copy job lands as a marker module file, never a phantom clan-core inventory instance that broke fleet-wide eval.",
  "blockers": []
}
**close-report** for #2018 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 2018, "status": "success", "commits": [ "47dd93aaba0af58199c64ce7624f2b7068411544" ], "changed_files": [ "STATUS.md", "docs/GOTCHAS.md", "internal/clan/backupcopy.go", "internal/clan/backupcopy_test.go", "internal/clan/config.go", "internal/clan/deployedservices.go", "internal/clan/seedcommunity_eval_test.go" ], "tests": [ { "command": "go test ./internal/clan/ ./internal/provision/", "exit_code": 0 }, { "command": "go test ./internal/fleetstate/... ./internal/backup/... ./internal/backupengine/... ./internal/monitor/... ./internal/rescue/... ./internal/founding/... ./internal/controlapi/...", "exit_code": 0 }, { "command": "IDSS_EVAL_SMOKE=1 go test ./internal/clan/ -run TestMemberDeviceBackupCopy_EvalSmoke", "exit_code": 0 }, { "command": "go build ./... && go vet ./internal/clan/... ./internal/provision/...", "exit_code": 0 } ], "criteria": { "A slug -> module mapping for member-device services; a slug with no real module is not written as a phantom clan-core instance": "internal/clan/backupcopy.go (renderlessModuleServices maps the renderless backup-copy job to a marker module file, not a clan-core instance); internal/clan/config.go AttachService resolves the renderless branch before writing any instance", "AttachService no longer commits a phantom instance that breaks fleet-wide eval": "internal/clan/config.go AttachService renderless branch writes backup-copy.nix and NO inventory instance; proven by internal/clan/backupcopy_test.go TestAttachService_BackupCopyLandsAsRenderlessMarkerNeverAPhantomInstance (asserts len(inv.Instances)==0)", "A test evaluates the REAL inventory (not the fake) for the member-offerable renderless service": "internal/clan/seedcommunity_eval_test.go TestMemberDeviceBackupCopy_EvalSmoke evals clanInternals.inventoryClass.inventorySerialization against real clan-core (d098fa2) with Backup copy placed and asserts an empty instances set — ran green under IDSS_EVAL_SMOKE=1", "A failed/placed backup-copy leaves no instance breaking evaluation for the rest of the fleet": "no instance is ever written for a renderless service; DetachService removes the marker (backup_copy_test.go TestDetachService_BackupCopyRemovesTheMarker); the eval smoke proves the community serializes clean with it placed" }, "summary": "The renderless backup-copy job lands as a marker module file, never a phantom clan-core inventory instance that broke fleet-wide eval.", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#2018
No description provided.