Skip to content
Permalink
Browse files
Prevent nodes that are still starting up from being idle-stopped
Per JENKINS-23792, the EC2 plugin will shut down nodes that're still starting
up if the idle timeout is shorter than the time the node takes to go from
launch request to successfully starting its first job on an executor.

To prevent this, don't perform idle shutdown on a node that is marked offline.
When it comes online, executors will be created and the new idle time will
become the executor creation time, effectively resetting the timer.
  • Loading branch information
ringerc committed Jul 21, 2014
1 parent 1b15ce7 commit d0cd0db5b845c747607a60759eebb7d31e4ea32b
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/main/java/hudson/plugins/ec2/EC2RetentionStrategy.java
@@ -81,6 +81,14 @@ private long _check(EC2Computer c) {
return 1;
}

/*
* Don't idle-out instances that're offline, per JENKINS-23792. This
* prevents a node from being idled down while it's still starting up.
*/
if (c.isOffline()) {
return 1;
}

if (c.isIdle() && !disabled) {
if (idleTerminationMinutes > 0) {
// TODO: really think about the right strategy here

0 comments on commit d0cd0db

Please sign in to comment.