-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Jenkins 2.249.2
ec2-plugin 1.56
Hello,
currently it is not possible to set up a template with spot instances that does not specify a bid price.
Not setting a price like this:
Results in this error: "Invalid Spot price specified: null"
Not setting the "Set bid price" for me results in Jenkins just spinning up a usual ec2 instance without a spot request:
It is possible to create spot requests in EC2 without setting a bid price. This results in a default bid price matching the on-demand price and behaving otherwise same.
This is described here: https://aws.amazon.com/de/blogs/compute/new-amazon-ec2-spot-pricing/
I see here that the used library also shortly mentions the default to be the on-demand price so it is an optional setting: https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/ec2/model/RequestSpotInstancesRequest.html#setSpotPrice-java.lang.String-
Is there any reason why this is not yet possible in this plugin?
This is a legacy issue, the code just wasn't updated to allow this. Only more recently has AWS allowed this behaviour