ec2-plugin
ec2-plugin copied to clipboard
Handle DescribeInstances failures when creating new instance
Sometimes when launching a new instance, DescribeInstances
does not report data within the amount of time that getInstanceWithRetry
waits. However, the instance is created and eventually Jenkins can't create any more nodes because we're at maximum capacity.
This PR attempts 2 fixes:
-
Increase the timeout waiting for
DescribeInstances
to return data when creating a new instance -
If no data could be found, send a termination request for the request so it doesn't pollute the capacity accounting.
BTW, I haven't actually run or built this code. I don't have a setup to build Jenkins plugins.
Looks like you have a compiler error. You can build the plugin by running mvn install
.