Skip to content

Leave no trace: an undrained pool's SQS queue has no deleter (#1319 follow-up) #1351

Closed

Description

@scttfrdmn

Follow-up to #1319. Owner principle (#610): anything spore.host creates, it removes once it is no longer needed.

The SQS queue of a pool that is never drained has no spawn deleter. spawn pool drain deletes the queue, the worker role and the instance profile. #1319 (PR #1350) gave abandoned pool roles a deleter through pkg/instancerole. The pool's queue (pkg/taskpool/queue.go, 12 h message retention) and any spec objects it staged are still left behind.

AWS documents that SQS may delete a queue after 30 days with no activity. That is not a deleter we control, and no spawn command removes the queue.

Proposal: spawn cleanup (and optionally the reaper) deletes a spawn-tagged pool queue (spawn:managed=true, plus the pool run-id tag) when all of these hold:

The reaper would need sqs:ListQueues, GetQueueAttributes, ListQueueTags and DeleteQueue, scoped to spawn's pool queue name prefix and provisioned by spore.host's own templates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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