public class EC2FleetNodeComputer
extends hudson.slaves.SlaveComputer
EC2FleetNode| Constructor and Description |
|---|
EC2FleetNodeComputer(hudson.model.Slave slave) |
| Modifier and Type | Method and Description |
|---|---|
String |
getDisplayName()
Return label which will represent executor in "Build Executor Status"
section of Jenkins UI.
|
EC2FleetNode |
getNode() |
void |
taskCompleted(hudson.model.Executor executor,
hudson.model.Queue.Task task,
long durationMS)
Will be called when task execution finished by slave, detailed documentation
SlaveComputer.taskCompleted(Executor, Queue.Task, long) |
_connect, disconnect, doDoDisconnect, doLaunchSlaveAgent, doSlaveAgentJnlp, getAbsoluteRemoteFs, getChannel, getChannelToMaster, getClassLoadingCount, getClassLoadingPrefetchCacheCount, getClassLoadingTime, getDefaultCharset, getIcon, getJnlpJars, getJnlpMac, getLauncher, getLogRecords, getOSDescription, getResourceLoadingCount, getResourceLoadingTime, getRetentionStrategy, getSlaveVersion, getSystemInfoExtensions, grabLauncher, isAcceptingTasks, isConnecting, isJnlpAgent, isLaunchSupported, isUnix, kill, openLogFile, setAcceptingTasks, setChannel, setChannel, setChannel, setNode, taskAccepted, taskCompletedWithProblems, tryReconnect_doScript, addAction, buildEnvironment, checkPermission, cliConnect, cliDisconnect, cliOffline, cliOnline, connect, countBusy, countExecutors, countIdle, currentComputer, disconnect, doChangeOfflineCause, doConfigDotXml, doConfigSubmit, doDoDelete, doDumpExportTable, doProgressiveLog, doRssAll, doRssFailed, doScript, doScriptText, doToggleOffline, getACL, getActions, getApi, getBuilds, getCaption, getComputerPanelBoxs, getConnectTime, getDemandStartMilliseconds, getDisplayExecutors, getEnvironment, getEnvVars, getExecutors, getHeapDump, getHostName, getIconAltText, getIconClassName, getIdleStartMilliseconds, getLoadStatistics, getLog, getLogDir, getLogFile, getLogText, getMonitorData, getName, getNumExecutors, getOfflineCause, getOfflineCauseReason, getOneOffExecutors, getSearchUrl, getSystemProperties, getTerminatedBy, getThreadDump, getTiedJobs, getTimeline, getUrl, getWorkspaceList, hasPermission, interrupt, isAlive, isIdle, isManualLaunchAllowed, isOffline, isOnline, isPartiallyIdle, isTemporarilyOffline, launch, onRemoved, recordTermination, relocateOldLogs, resolveForCLI, setTemporarilyOffline, setTemporarilyOffline, updateByXml, waitUntilOffline, waitUntilOnlinedoContextMenu, getAction, getAction, getActions, getAllActions, getDynamic, replaceActionpublic EC2FleetNode getNode()
getNode in class hudson.slaves.SlaveComputer@Nonnull public String getDisplayName()
EC2FleetNode could
be removed before this, so name will be just predefined static.getDisplayName in interface hudson.model.ModelObjectgetDisplayName in class hudson.model.Computernull predefined text about thatpublic void taskCompleted(hudson.model.Executor executor,
hudson.model.Queue.Task task,
long durationMS)
SlaveComputer.taskCompleted(Executor, Queue.Task, long)
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.
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.
method checks Computer.getOfflineCause() for disconnect because of EC2 instance termination
it returns
result = {OfflineCause$ChannelTermination@13708} "Connection was broken: java.io.IOException:
Unexpected termination of the channel\n\tat hudson.remoting.SynchronousCommandTransport$ReaderThread...
cause = {IOException@13721} "java.io.IOException: Unexpected termination of the channel"
timestamp = 1561067177837
taskCompleted in interface hudson.model.ExecutorListenertaskCompleted in class hudson.slaves.SlaveComputerexecutor - executortask - taskdurationMS - durationCopyright © 2016–2019. All rights reserved.