Skip to content

TTL reaper cannot terminate an untagged replacement launched by a leaked persistent Spot request #984

Closed

Description

@scttfrdmn

Follow-up to #950.

The persistent-Spot-request sweep from #950 (PR #981) finds a replacement instance EC2 launched from a spawn persistent request after the original was terminated outside spawn. Every replacement is expected to be untagged. A Spot request's LaunchSpecification, which EC2 relaunches from, has no tag field, and RunInstances' instance TagSpecifications apply only when RunInstances runs. This was not verified live.

The reaper's ec2:TerminateInstances is conditioned on ec2:ResourceTag/spawn:managed=true, so it cannot terminate an untagged instance. Its ec2:CreateTags has the same condition, so it cannot adopt one by tagging it either. The sweep cancels the request, which stops further launches, then logs the alarmed SPOT REPLACEMENT NOT TERMINATED with the command to run. A person still has to terminate the instance, and until then it bills untagged and invisible to spawn list.

Options, none taken in #981 because each needs verification against IAM or a live launch:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions