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
Nothing reclaims an orphaned persistent Spot request (instance terminated outside spawn); consider a reaper sweep #950
Follow-up to #922. #922 makes --spot launches that have a stop-based lifecycle use persistent Spot requests. Every spawn terminate path now cancels the request before terminating the instance: pkg/awsClient.Terminate, spored's self-terminate, the TTL reaper and the dashboard.
Some paths still leave the request open, and nothing reclaims it:
The instance is terminated outside spawn: the EC2 console, aws ec2 terminate-instances, or another tool's own TerminateInstances.
A cancel is refused. The reaper and spored still terminate (hard-deadline guarantee) and log SPOT_CANCEL_FAILED with the request id. This is the case until an account's spawn-ttl-reaper-ec2 stack is redeployed with the new ec2:CancelSpotInstanceRequests grant, and until an instance role is healed by a newer launch.
An open persistent request launches a replacement instance. Unverified: whether that replacement carries the original instance's tags. If it doesn't, it is invisible to spawn list and to the reaper.
Proposal: add a reaper sweep with ec2:DescribeSpotInstanceRequests, filtered on tag:spawn:managed=true and type persistent, in state open, active or disabled. Cancel a request when either is true:
its instance is terminated or missing;
its spawn:ttl-deadline tag (the request carries the instance's tags) is past, or it exceeds the max-age ceiling.
Then terminate any instance it launched. Tag-condition the cancel the same way #922 does.
Also worth considering: a ValidUntil on persistent requests as a hard bound, for example launch time plus the reaper max-age. Check its interaction with spawn extend and with starting a stopped instance after the request expires before adopting it.
Activity
Reap orphaned persistent Spot requests and bound them with ValidUntil (…
Reap orphaned persistent Spot requests and bound them with ValidUntil (…
Reap orphaned persistent Spot requests and bound them with ValidUntil (…