@ThreadSafe public class EC2FleetAutoResubmitComputerLauncher extends DelegatingComputerLauncher
ComputerLauncherto get notification when slave was disconnected and automatically resubmit
Queue.Taskif reason is unexpected termination which usually means EC2 instance was interrupted.
This is optional feature, it's enabled by default, but could be disabled by
|Constructor and Description|
|Modifier and Type||Method and Description|
beforeDisconnect, getLauncher, launch
afterDisconnect, beforeDisconnect, checkJavaVersion, isLaunchSupported, launch
public EC2FleetAutoResubmitComputerLauncher(ComputerLauncher launcher)
public void afterDisconnect(SlaveComputer computer, TaskListener listener)
EC2 Fleet plugin overrides this method to detect jobs which were failed because of EC2 instance was terminated/stopped. It could be manual stop or because of Spot marked. In all cases as soon as job aborted because of broken connection and slave is offline it will try to resubmit aborted job back to the queue, so user doesn't need to do that manually and another slave could take it.
There is no official recommendation about way how to resubmit job according to https://issues.jenkins-ci.org/browse/JENKINS-49707 moreover some of Jenkins code says it impossible.
We resubmit any active executables that were being processed by the disconnected node, regardless of why the node disconnected.
Copyright © 2016–2022. All rights reserved.