in src/main/java/com/amazon/jenkins/ec2fleet/EC2FleetCloud.java [586:597]
private void removeNode(final String instanceId) {
final Jenkins jenkins = Jenkins.getInstance();
// If this node is dying, remove it from Jenkins
final Node n = jenkins.getNode(instanceId);
if (n != null) {
try {
jenkins.removeNode(n);
} catch (final Exception ex) {
throw new IllegalStateException(String.format("Error removing node %s", instanceId), ex);
}
}
}