Class EC2FleetAutoResubmitComputerLauncher
- All Implemented Interfaces:
ExtensionPoint
,Describable<ComputerLauncher>
EC2FleetAutoResubmitComputerLauncher
is responsible for controlling:
* how EC2FleetNodeComputer
s are launched
* how EC2FleetNodeComputer
s connect to agents EC2FleetNode
This is wrapper for ComputerLauncher
to get notification when agent was disconnected
and automatically resubmit Queue.Task
if 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
EC2FleetCloud.isDisableTaskResubmit()
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.slaves.DelegatingComputerLauncher
DelegatingComputerLauncher.DescriptorImpl
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields inherited from class hudson.slaves.DelegatingComputerLauncher
launcher
Fields inherited from class hudson.slaves.ComputerLauncher
LIST
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
afterDisconnect
(SlaveComputer computer, TaskListener listener) Methods inherited from class hudson.slaves.DelegatingComputerLauncher
beforeDisconnect, getLauncher, launch
Methods inherited from class hudson.slaves.ComputerLauncher
afterDisconnect, beforeDisconnect, checkJavaVersion, isLaunchSupported, launch
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Constructor Details
-
EC2FleetAutoResubmitComputerLauncher
-
-
Method Details
-
afterDisconnect
ComputerLauncher.afterDisconnect(SlaveComputer, TaskListener)
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 agent is offline it will try to resubmit aborted job back to the queue, so user doesn't need to do that manually and another agent could take it.
Implementation details
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.
- Overrides:
afterDisconnect
in classDelegatingComputerLauncher
- Parameters:
computer
- computerlistener
- listener
-