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
Live-verify a way to end an untagged Spot replacement without a person (follow-up to #984) #995
Follow-up to #984. The fix for #984 kept the SPOT REPLACEMENT NOT TERMINATED alarm and made it actionable, because no option could be shown to be safe without a live account. These two remain open, and each needs a live check this repo has not done.
1. Have spored in the replacement end itself. No new IAM is needed for detection:
DescribeInstances on itself gives SpotInstanceRequestId.
DescribeTags filtered by resource-id=sir-… reads the request's tags. The spored role already grants both, unconditioned and read-only.
A safe detection rule: the request has spawn:managed=true, and the request's spawn:original-instance-id is present and is not this instance's id. For an original instance that tag is either absent (not yet written) or equal to its own id, so an original can never match.
spored can cancel the request, which is spawn-tagged and covered by its existing grant, then shut down from the OS.
Unknowns to check with a real leaked persistent request:
Does the replacement run the request's UserData, and so start spored at all?
Does it get spawn's instance profile from the request's LaunchSpecification?
Does an OS shutdown of a replacement terminate it or stop it? The request's launch spec has no InstanceInitiatedShutdownBehavior. If it stops, the reaper still reports it, as a stopped instance with a cancelled request, and it bills EBS only.
2. A second reaper terminate condition.ec2:InstanceProfile (ArnLike spawn's profiles) plus ec2:InstanceMarketType=spot. Both are listed for the instance resource of TerminateInstances in the service reference. Before adopting it:
Decide whether "any untagged Spot instance with a spawn instance profile" is narrow enough, since anyone can launch with that profile.
Not available: an IAM condition tying an instance to its Spot request. The instance resource has no such key, aws:ResourceTag on an instance action is the instance's tags, and spot-instances-request has only tag and region keys. Checked against servicereference.us-east-1.amazonaws.com/v1/ec2/ec2.json.
Activity
Have spored retire a Spot replacement it finds itself running on (#995)
Stop a Spot replacement from re-running the user's workload (#1007)
Have spored retire a Spot replacement it finds itself running on (#995)
Have spored retire a Spot replacement it finds itself running on (#995)…
Stop a Spot replacement from re-running the user's workload (#1007)
Stop a Spot replacement from re-running the user's workload (#1007) (#…