Skip to content

spawn-pool-worker-<hash> roles of a pool that is never drained are never deleted #1319

Closed

Description

@scttfrdmn

Follow-up from #1300, which gives per-task spawn-instance-* roles a deleter (pkg/instancerole, the TTL reaper and spawn cleanup --instance-roles). It deliberately excludes spawn-pool-worker-<hash> roles because spawn pool drain already deletes them (cmd/pool.go removePoolWorkerIdentity, #1147).

Gap: that is the only deleter. A pool whose drain is never run (the caller crashed, a user forgot, nf-spawn's run-end hook did not fire) leaves its role and instance profile in the account indefinitely after its workers hit their TTL. Nothing in lambda/ttl-reaper or pkg/ matches spawn-pool-worker (checked with grep on 2026-10-26). Per spore-host/spore-host#610 the deleter should be named.

Options: extend pkg/instancerole's prefix set to spawn-pool-worker- (the same rule fits: tagged spawn:managed=true, no live instance holds the profile, 24h old and unused for 24h), which would also need the reaper IAM grants widened to that one extra prefix in pkg/reaperiam and both templates; or have the reaper delete it once the pool's SQS queue is gone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions