taskcluster / ec2-manager

Mozilla Public License 2.0
2 stars 14 forks source link

terminateInstances doesn't handle InvalidInstanceID.NotFound #55

Open jonasfj opened 6 years ago

jonasfj commented 6 years ago

See: https://sentry.prod.mozaws.net/operations/ec2-manager/issues/1353073/

When people sheriffs kill bad instances, and they happen to be gone, they get a 500 error. If the instanceId doesn't exist, we should probably just return 200 ok... as deleting an instance that doesn't exist seems like a successful noop.

I suspect this can be a race condition where people click multiple times, or the instance is racing to kill itself while people are killing it... Hence, by just saying a missing instance is a successful deletion, we get an idempotent operation.