-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Blocker
-
Component/s: ec2-plugin
-
None
-
Environment:Jenkins version: 2.492.2 (Docker image jenkins/jenkins:lts)
Plugin version: 1872.v8757931fec80
-
1873.vf0b_f234b_e2f3
Hi,
Apparently the release 1872.v8757931fec80 ( https://github.com/jenkinsci/ec2-plugin/releases/tag/1872.v8757931fec80 ) is breaking the spot instances creation:
2025-03-07 19:19:58.894+0000 [id=54] Â Â INFO Â Â hudson.plugins.ec2.EC2Cloud#provision: SlaveTemplate{description='ubuntu24.04-base-jenkinsagent-v1.4', labels='spot-agent'}. Attempting to provision agent needed by excess workload of 1 units
2025-03-07 19:19:58.897+0000 [id=54] Â Â SEVERE Â Â hudson.triggers.SafeTimerTask#run: Timer task hudson.slaves.NodeProvisioner$NodeProvisionerInvoker@58ea4179 failed
java.lang.UnsupportedOperationException: Client is immutable when created with the builder.
  at PluginClassLoader for aws-java-sdk-minimal//com.amazonaws.AmazonWebServiceClient.checkMutability(AmazonWebServiceClient.java:1057)
  at PluginClassLoader for aws-java-sdk-minimal//com.amazonaws.AmazonWebServiceClient.setEndpoint(AmazonWebServiceClient.java:316)
  at PluginClassLoader for ec2//hudson.plugins.ec2.util.AmazonEC2FactoryImpl.connect(AmazonEC2FactoryImpl.java:19)
  at PluginClassLoader for ec2//hudson.plugins.ec2.EC2Cloud.reconnectToEc2(EC2Cloud.java:1237)
  at PluginClassLoader for ec2//hudson.plugins.ec2.EC2Cloud.connect(EC2Cloud.java:1250)
  at PluginClassLoader for ec2//hudson.plugins.ec2.EC2Cloud.countCurrentEC2Slaves(EC2Cloud.java:699)
  at PluginClassLoader for ec2//hudson.plugins.ec2.EC2Cloud.getPossibleNewSlavesCount(EC2Cloud.java:904)
  at PluginClassLoader for ec2//hudson.plugins.ec2.EC2Cloud.getNewOrExistingAvailableSlave(EC2Cloud.java:925)
  at PluginClassLoader for ec2//hudson.plugins.ec2.EC2Cloud.provision(EC2Cloud.java:975)
  at hudson.slaves.Cloud.provision(Cloud.java:228)
  at hudson.slaves.NodeProvisioner$StandardStrategyImpl.apply(NodeProvisioner.java:726)
  at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:325)
  at hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:823)
  at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:92)
  at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:67)
  at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
  at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
  at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  at java.base/java.lang.Thread.run(Unknown Source)
After reverting to 1856.vf40220e7a_75f it's correctly working again.