You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TTL reaper cannot terminate an untagged replacement launched by a leaked persistent Spot request #984
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:
Have spored in the replacement notice it at boot: it has no spawn:managed tag, but its SpotInstanceRequestId names a spawn-tagged request. It could then shut down or tag itself. This needs a self-scoped grant, e.g. ec2:SourceInstanceARN.
Activity
Make the stranded Spot replacement alarm actionable; record why the r…
Make the stranded Spot replacement alarm actionable; record why the r…
Make the stranded Spot replacement alarm actionable; record why the r…