-
Improvement
-
Resolution: Fixed
-
Minor
-
None
Due to a variety of problems with the current implementation i started to refactor the spot functionality to poll the spot instance request for the instanceid until its known.
From that point on the Spot instance can be treated as a regular OnDemand instance.
I am currently testing the functionality on our system but will create a pull request once its working for a while. (Please have a look at https://github.com/nexus49/ec2-plugin) in case you want to provide feedback.
With this functionality it is not necessary to do any modification on the used ami specifically for spot support.
Code changed in jenkins
User: Michael Barrientos
Path:
src/main/java/hudson/plugins/ec2/EC2AbstractSlave.java
src/main/java/hudson/plugins/ec2/EC2ComputerLauncher.java
src/main/java/hudson/plugins/ec2/EC2SpotComputerLauncher.java
src/main/java/hudson/plugins/ec2/EC2SpotRetentionStrategy.java
src/main/java/hudson/plugins/ec2/EC2SpotSlave.java
src/main/java/hudson/plugins/ec2/SlaveTemplate.java
src/main/resources/hudson/plugins/ec2/SlaveTemplate/config.jelly
http://jenkins-ci.org/commit/ec2-plugin/ae7e53ab99028fd8ede1a3e41907812c2edb0eec
Log:
Poll for spot instances instead of JNLP launcher
JENKINS-27529JENKINS-19059JENKINS-32399)